Every error is application/problem+json; each item in errors has one of these codes, the field it is about and a fix.
| Code | Status | Meaning | Fix |
|---|---|---|---|
authentication_required | 401 | Authentication required | Send 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_key | 401 | Invalid API key | Send 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_revoked | 401 | API key revoked | This key was revoked. Create a new key in Orbit > Developers. |
api_key_expired | 401 | API key expired | This key was rotated and its 24 hours of overlap are over. Use the newer key from Orbit > Developers. |
ip_not_allowed | 403 | IP address not allowed | Call from one of the IP addresses on this key, or have a dashboard admin add this address to the key in Orbit > Developers. |
insufficient_scope | 403 | Missing permission | Use a key with the permission this operation needs (the API reference lists it for each operation), or create one in Orbit > Developers. |
account_not_linked | 403 | Account not linked | Your PGS360 account is not linked to a warehouse account yet. Contact your PGS360 account team. |
account_not_eligible | 403 | Not available for this account | This account uses PGS360 for transportation only, so orders and inventory are not available through the API. Contact your PGS360 account team. |
test_key_required | 403 | Test key required | Sandbox operations take test keys only (pgs_test_...). Create one in Orbit > Developers. |
order_creation_unavailable | 403 | Order creation not available | Creating orders is not open for this account yet. Contact your PGS360 account team. |
order_changes_unavailable | 403 | Order changes not available | Changing and cancelling orders is not open for this account yet. Contact your PGS360 account team. |
not_found | 404 | Not found | Check the method and path against the API reference at /developers/api. |
order_not_found | 404 | Order not found | Use 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_json | 400 | Body is not valid JSON | Send one JSON object in the body with Content-Type: application/json. |
unsupported_media_type | 415 | Unsupported media type | Send the body as JSON with Content-Type: application/json. |
payload_too_large | 413 | Body too large | Keep the body under 1 MB: one order per request, up to 300 lines. |
invalid_parameter | 400 | Invalid query parameter | Check the query parameters against the API reference. |
invalid_cursor | 400 | Invalid cursor | Pass 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_required | 400 | Idempotency-Key required | Send 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_invalid | 400 | Invalid Idempotency-Key | Use 1 to 255 visible ASCII characters, for example a UUID. |
idempotency_key_reused | 409 | Idempotency-Key already used | This Idempotency-Key was used for a different request in the last 24 hours. Send a new key for a new request. |
idempotency_in_progress | 409 | Request still running | A request with this Idempotency-Key is still running. Wait the Retry-After seconds, then retry with the same key and body. |
validation_failed | 422 | The request has problems | Fix 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_rejected | 422 | The order was not accepted | Read 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_editable | 409 | Order can no longer be changed | Orders can be changed only until the warehouse starts them. Contact your PGS360 account team for later changes. |
order_not_cancellable | 409 | Order can no longer be cancelled | Orders can be cancelled only until the warehouse starts them. Contact your PGS360 account team. |
sandbox_invalid_transition | 409 | Sandbox order cannot move there | Sandbox orders move forward only (picked, shipped, delivered) and cancelled ones do not move. Create a new sandbox order to start over. |
rate_limited | 429 | Too many requests | Slow down: wait the Retry-After seconds, then retry. RateLimit-Remaining on every answer shows what is left this minute. |
service_unavailable | 503 | Briefly unavailable | Our order system is briefly unreachable. Retry after the Retry-After seconds (with the same Idempotency-Key for a POST). |
internal_error | 500 | Something went wrong | Retry the request (with the same Idempotency-Key for a POST). If it keeps failing, contact PGS360 with the request_id. |
unknown_field | 422 | Unknown field | Remove the field or correct its spelling (field names are snake_case, as in the API reference). |
required_field | 422 | Required field missing | Add this field. |
invalid_type | 422 | Wrong type | Send this field with the type the API reference shows. |
invalid_value | 422 | Value not allowed | Use one of the values the API reference lists for this field. |
too_long | 422 | Value too long | Shorten the value to the maximum length in the message. |
too_many | 422 | Too many items | Send at most the number of items in the message. |
invalid_email | 422 | Invalid email | Send an email address like receiving@example.com, or leave it out. |
invalid_date | 422 | Invalid date | Use a date as YYYY-MM-DD. |
invalid_quantity | 422 | Invalid quantity | Send a whole number of units above 0 (quantities are units, not cases). |
field_not_supported | 422 | Field not used for this order type | Remove this field: it does not apply to this type of order. |
nothing_to_change | 422 | Nothing to change | Send at least one field to change. |
unknown_account | 422 | Unknown account | Use one of your account numbers, or leave account out to use your main account. |
dtc_not_set_up | 422 | B2C orders not set up | This account has no consumer (DTC) store set up yet. Contact your PGS360 account team, or send a b2b order. |
unknown_sku | 422 | Unknown SKU | Use one of your active SKUs exactly as GET /v2/inventory lists it, or create the SKU in Orbit first. |
unknown_warehouse | 422 | Unknown warehouse | Use a warehouse code your account ships from, as GET /v2/inventory lists them (for example PR, EO, SCF, FW). |
unknown_lot | 422 | Lot not in stock | Use a lot that GET /v2/inventory lists for this SKU in this warehouse, or leave lot out. |
insufficient_stock | 422 | Not enough stock | Lower the quantity to what GET /v2/inventory shows as available, choose another warehouse, or wait until the stock arrives. |
may_backorder | 422 | May go on backorder | No change needed: the order is accepted and waits (backordered) for the units not in stock yet. |
not_whole_cases | 422 | Not whole cases | No change needed, or order whole cases so no case is opened. |
duplicate_reference | 422 | Reference already used | Give each order its own reference (PO or order number). To change an existing order use PATCH /v2/orders/{id}. |
unknown_country | 422 | Unknown country | Use the 2 or 3-letter country code (for example US, CA, MX or MEX). |
invalid_zip | 422 | Invalid ZIP code | Use a 5-digit US ZIP code or ZIP+4 (12345-6789). |
address_not_found | 422 | Address not confirmed | Correct the address (the message includes the suggested version when there is one) and send it again. |
address_check_unavailable | 422 | Address not checked | No change needed: the address could not be checked right now, so make sure it is right. |
international_documents | 422 | International order | No change needed: PGS360 prepares the commercial invoice and emails it to you before the pickup. |
due_date_past | 422 | Ship due date in the past | Use a ship due date (due_date) today or later, or leave it out. |
delivery_date_past | 422 | Delivery due date in the past | Use a delivery due date (delivery_date) today or later, or leave it out. |
delivery_before_ship | 422 | Delivery due date before the ship due date | delivery_date (when it must arrive) can't be before due_date (when it must ship). |
unknown_carrier | 422 | Unknown carrier | Leave shipping.carrier out to choose it later, or use a carrier name from your PGS360 carrier list. |
unknown_service | 422 | Unknown shipping service | Use one of the services in the message, or leave the service out for your default. |
shipping_option_unsupported | 422 | Shipping choice not available here | UPS, 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_saved | 422 | Shipping not saved | The order was created: choose its shipping on the order in Orbit. |
mixed_lines_of_business | 422 | Several lines of business | Send one order per line of business (split these SKUs into separate orders). |
sku_missing_line_of_business | 422 | SKU without a line of business | Contact your PGS360 account team to set the line of business for this SKU. |
account_credit_hold | 422 | Account over its credit limit | Contact the PGS360 accounts receivable team; orders can be created again once the account is within its credit limit. |
account_documentation_missing | 422 | Account documentation missing | Contact your PGS360 account team to complete the account documentation. |
already_cancelled | 409 | Already cancelled | No change needed: the order is already cancelled. |
already_shipped | 409 | Already shipped | The order has shipped. For a return or a new shipment, contact your PGS360 account team. |
warehouse_started | 409 | Warehouse already started | The warehouse has started this order. Contact your PGS360 account team to change it. |
order_locked | 409 | Order in use | The warehouse is working on this order right now. Retry after the Retry-After seconds. |
order_check_failed | 422 | Order check failed | Read the message and correct the order. If it is unclear, contact your PGS360 account team with the request_id. |