Update Order From Fulfillment (Power User)
PUT/api/starshipit/update-order/:sales_order_fulfillment
Pushes the current state of a sales order fulfillment to StarShipIt. If the fulfillment already has a linked StarShipIt order, that order is updated live via the StarShipIt API (preserving existing line identifiers); otherwise a new StarShipIt order is created. The result is persisted to the local order cache and returned.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
The path parameter is the sales order fulfillment ID. No request body.
Before submitting, the fulfillment is validated as a StarShipIt order payload (destination address, line items, etc.); when validation fails, a 400 is returned with per-field errors. A 502 is returned when the StarShipIt API call fails.
This is a legacy power-user endpoint kept for backward compatibility; it is not instance-scoped and resolves the single active StarShipIt integration instance itself. When no StarShipIt instance is configured, it returns HTTP 200 with an error payload (code StarshipitNotIntegrated).
Requires the power user role.
Authentication: Requires Bearer token.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 422
- 429
- 502
OK
Response Headers
Bad Request
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.
Bad Gateway