Error codes

Every error is application/problem+json; each item in errors has one of these codes, the field it is about and a fix.

CodeStatusMeaningFix
authentication_required401Authentication requiredSend your API key in the Authorization header as "Bearer pgs_live_..." (or a pgs_test_ key for the sandbox). Dashboard admins create keys in Orbit > Developers.
invalid_api_key401Invalid API keySend the whole key exactly as it was shown when it was created: pgs_live_ or pgs_test_ followed by 32 letters and digits.
api_key_revoked401API key revokedThis key was revoked. Create a new key in Orbit > Developers.
api_key_expired401API key expiredThis key was rotated and its 24 hours of overlap are over. Use the newer key from Orbit > Developers.
ip_not_allowed403IP address not allowedCall from one of the IP addresses on this key, or have a dashboard admin add this address to the key in Orbit > Developers.
insufficient_scope403Missing permissionUse a key with the permission this operation needs (the API reference lists it for each operation), or create one in Orbit > Developers.
account_not_linked403Account not linkedYour PGS360 account is not linked to a warehouse account yet. Contact your PGS360 account team.
account_not_eligible403Not available for this accountThis account uses PGS360 for transportation only, so orders and inventory are not available through the API. Contact your PGS360 account team.
test_key_required403Test key requiredSandbox operations take test keys only (pgs_test_...). Create one in Orbit > Developers.
order_creation_unavailable403Order creation not availableCreating orders is not open for this account yet. Contact your PGS360 account team.
order_changes_unavailable403Order changes not availableChanging and cancelling orders is not open for this account yet. Contact your PGS360 account team.
not_found404Not foundCheck the method and path against the API reference at /developers/api.
order_not_found404Order not foundUse the id from the order object (for example B2B-87166 or B2C-1093332). Live keys see real orders only and test keys see sandbox orders only (ids with -T).
invalid_json400Body is not valid JSONSend one JSON object in the body with Content-Type: application/json.
unsupported_media_type415Unsupported media typeSend the body as JSON with Content-Type: application/json.
payload_too_large413Body too largeKeep the body under 1 MB: one order per request, up to 300 lines.
invalid_parameter400Invalid query parameterCheck the query parameters against the API reference.
invalid_cursor400Invalid cursorPass next_cursor exactly as the previous page returned it, with the same filters, or leave cursor out to start from the first page.
idempotency_key_required400Idempotency-Key requiredSend an Idempotency-Key header with a new unique value (a UUID works) on every POST /v2/orders, and reuse it only to retry that same request.
idempotency_key_invalid400Invalid Idempotency-KeyUse 1 to 255 visible ASCII characters, for example a UUID.
idempotency_key_reused409Idempotency-Key already usedThis Idempotency-Key was used for a different request in the last 24 hours. Send a new key for a new request.
idempotency_in_progress409Request still runningA request with this Idempotency-Key is still running. Wait the Retry-After seconds, then retry with the same key and body.
validation_failed422The request has problemsFix each item in errors (its field and fix say what to change) and send the request again. POST /v2/orders/validate checks an order without creating it.
order_rejected422The order was not acceptedRead the message, correct the order and send it again with a new Idempotency-Key. If it repeats, contact your PGS360 account team with the request_id.
order_not_editable409Order can no longer be changedOrders can be changed only until the warehouse starts them. Contact your PGS360 account team for later changes.
order_not_cancellable409Order can no longer be cancelledOrders can be cancelled only until the warehouse starts them. Contact your PGS360 account team.
sandbox_invalid_transition409Sandbox order cannot move thereSandbox orders move forward only (picked, shipped, delivered) and cancelled ones do not move. Create a new sandbox order to start over.
rate_limited429Too many requestsSlow down: wait the Retry-After seconds, then retry. RateLimit-Remaining on every answer shows what is left this minute.
service_unavailable503Briefly unavailableOur order system is briefly unreachable. Retry after the Retry-After seconds (with the same Idempotency-Key for a POST).
internal_error500Something went wrongRetry the request (with the same Idempotency-Key for a POST). If it keeps failing, contact PGS360 with the request_id.
unknown_field422Unknown fieldRemove the field or correct its spelling (field names are snake_case, as in the API reference).
required_field422Required field missingAdd this field.
invalid_type422Wrong typeSend this field with the type the API reference shows.
invalid_value422Value not allowedUse one of the values the API reference lists for this field.
too_long422Value too longShorten the value to the maximum length in the message.
too_many422Too many itemsSend at most the number of items in the message.
invalid_email422Invalid emailSend an email address like receiving@example.com, or leave it out.
invalid_date422Invalid dateUse a date as YYYY-MM-DD.
invalid_quantity422Invalid quantitySend a whole number of units above 0 (quantities are units, not cases).
field_not_supported422Field not used for this order typeRemove this field: it does not apply to this type of order.
nothing_to_change422Nothing to changeSend at least one field to change.
unknown_account422Unknown accountUse one of your account numbers, or leave account out to use your main account.
dtc_not_set_up422B2C orders not set upThis account has no consumer (DTC) store set up yet. Contact your PGS360 account team, or send a b2b order.
unknown_sku422Unknown SKUUse one of your active SKUs exactly as GET /v2/inventory lists it, or create the SKU in Orbit first.
unknown_warehouse422Unknown warehouseUse a warehouse code your account ships from, as GET /v2/inventory lists them (for example PR, EO, SCF, FW).
unknown_lot422Lot not in stockUse a lot that GET /v2/inventory lists for this SKU in this warehouse, or leave lot out.
insufficient_stock422Not enough stockLower the quantity to what GET /v2/inventory shows as available, choose another warehouse, or wait until the stock arrives.
may_backorder422May go on backorderNo change needed: the order is accepted and waits (backordered) for the units not in stock yet.
not_whole_cases422Not whole casesNo change needed, or order whole cases so no case is opened.
duplicate_reference422Reference already usedGive each order its own reference (PO or order number). To change an existing order use PATCH /v2/orders/{id}.
unknown_country422Unknown countryUse the 2 or 3-letter country code (for example US, CA, MX or MEX).
invalid_zip422Invalid ZIP codeUse a 5-digit US ZIP code or ZIP+4 (12345-6789).
address_not_found422Address not confirmedCorrect the address (the message includes the suggested version when there is one) and send it again.
address_check_unavailable422Address not checkedNo change needed: the address could not be checked right now, so make sure it is right.
international_documents422International orderNo change needed: PGS360 prepares the commercial invoice and emails it to you before the pickup.
due_date_past422Ship due date in the pastUse a ship due date (due_date) today or later, or leave it out.
delivery_date_past422Delivery due date in the pastUse a delivery due date (delivery_date) today or later, or leave it out.
delivery_before_ship422Delivery due date before the ship due datedelivery_date (when it must arrive) can't be before due_date (when it must ship).
unknown_carrier422Unknown carrierLeave shipping.carrier out to choose it later, or use a carrier name from your PGS360 carrier list.
unknown_service422Unknown shipping serviceUse one of the services in the message, or leave the service out for your default.
shipping_option_unsupported422Shipping choice not available hereUPS, FedEx and PGS delivery for b2b orders are chosen on the order in Orbit after it is created: leave shipping.carrier out here.
shipping_not_saved422Shipping not savedThe order was created: choose its shipping on the order in Orbit.
mixed_lines_of_business422Several lines of businessSend one order per line of business (split these SKUs into separate orders).
sku_missing_line_of_business422SKU without a line of businessContact your PGS360 account team to set the line of business for this SKU.
account_credit_hold422Account over its credit limitContact the PGS360 accounts receivable team; orders can be created again once the account is within its credit limit.
account_documentation_missing422Account documentation missingContact your PGS360 account team to complete the account documentation.
already_cancelled409Already cancelledNo change needed: the order is already cancelled.
already_shipped409Already shippedThe order has shipped. For a return or a new shipment, contact your PGS360 account team.
warehouse_started409Warehouse already startedThe warehouse has started this order. Contact your PGS360 account team to change it.
order_locked409Order in useThe warehouse is working on this order right now. Retry after the Retry-After seconds.
order_check_failed422Order check failedRead the message and correct the order. If it is unclear, contact your PGS360 account team with the request_id.