swagger: '2.0' info: x-logo: url: https://storage.googleapis.com/boxc_cdn/public/boxc-logo.png altText: BoxC title: BoxC version: '1.123' description: | A simple but powerful logistics API that drives international ecommerce by utilizing a single integration with access to dozens of carriers and global markets. BoxC can complete every leg or only select steps of a shipment's journey on your behalf with our routing engine. schemes: - https tags: - name: Authentication x-displayName: Authentication description: | This API uses OAuth 2.0 for authentication and authorization. The OAuth 2.0 flow allows users to grant clients permission to access the API with their account. A client is required to create access tokens. An access token is required to use the API. The token is like a password or key to a door and must be kept secret. You can create up to two OAuth 2.0 clients in your account. Information about creating a client and managing client settings can be found in the [Support Center](https://support.boxc.com/support/solutions/articles/65000182698-setting-up-an-oauth-2-0-client). The access tokens are JSON Web Tokens (JWT) that are encoded and signed with your client's private key. When making a request to the API the following events occur: - It verifies the authenticity of the token using the public key and that the token was indeed issued to the client. - It confirms that the user is still allowing the client to use the token. Users have the ability to revoke a previously authorized connection. - It checks that the client has permission to read or write to the resource being accessed. For each step a different error will be returned if any of them fail. ### Request Headers This API use the "Bearer" authorization type and expects an `Authorization` header for authentication similar to the below example: ```text Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImFkODQ3YjJkZTNmMTY1NjFlMDg3MDJhNjY2Mjc1MWMzOGVlODc0ZjcifQ.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjkwMDEiLCJpYXQiOjE2NjUwODUwNTcsImV4cCI6MTk4MDQ0NTA1NywiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDoxMDAwMCIsInN1YiI6IjEiLCJjbGllbnRfaWQiOiIxMDAwMDAwMDAwMTY2NDM0NTY5MiIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwifQ.Bw1eJoFS2uESK0IJQ2ICBn0Ksp3m0lXt53Fiy2KjoLGc97XZs0c_Y2tjvg0qaJKDegjbmGiLlsWWE5HgA04H9ZPAdzfjWHdmFTyABB4_m821UlHIXqdYgvgfu8221QPVbwwOCBRfdoM4XrvohUxqfV9ZUmyUv0xk-G8iWR9hefkYmgRMmh5SZafqljs3iWanoIRn9vL0rSehW7PL2jobf7izMtdv1N8OHF2Vdbk9IIFvuKxpfsM_C9-KAIm1vgSLaZd3bSovN1d9JN2D9ER_Y4LHctvfA1CMLtQQo3s7LanvoKV6wj8LixjQ8MT7cPeVyiyPEF46qSvbyb8tweZcAg ``` You are given a unique Client ID when creating a new client. The access token is granted to you by the Authorization Server after an authenticated user authorizes your client. See [requesting authorization from a BoxC account](https://support.boxc.com/support/solutions/articles/65000182701-request-authorization-from-a-boxc-account) for more information. ### Authorization Server The entire authorization workflow occurs at https://accounts.boxc.com/ because it relies on users to authenticate before authorizing a client. The authorization server relies on the client to send the user to it with some query parameters in the URI to identify the client and authorization type. ### Redirect URI All clients must provide a `redirect_uri` in the client settings and when making an OAuth 2.0 request to the authorization server. The redirect URI must exactly match the client configuration. It can include query or fragment parameters. ## GET accounts.boxc.com/auth/v1/authorize Requests a user to authenticate with BoxC and authorize your client so you can receive an access token and/or ID token. Descriptions about the different response types and modes can be found on the [Request Authorization From a BoxC Account](https://support.boxc.com/support/solutions/articles/65000182701-request-authorization-from-a-boxc-account) support page. | Param | Description | Required | |-------|-------------|----------| | client_id | The OAuth 2.0 Client ID | Y | | redirect_uri | Where the user-agent will be returned after allowing or declining your authorization request. | Y | | response_mode | Tells the authentication server to use "query" or "fragment" parameters in the redirect_uri. | N | | response_type | Tells the authorization server which type of response you're expecting after authorization. | Y | | state | Opaque value used to maintain state between the request and the callback. | N | | nonce | Used for associating a client session with an id_token, and for mitigating replay attacks. It will be included in the id_token claims if provided. | N | Example request: ```text GET https://accounts.boxc.com/auth/v1/authorize?client_id=10000000001664345692&response_mode=query&response_type=code&redirect_uri=https://www.myapp.com?provider=boxc ``` Response: ```text HTTP/1.1 200 OK {{webpage}} ``` ## POST accounts.boxc.com/auth/v1/token Submit an authorization code to complete the process for the **code** response type and receive an access token and ID token. The redirect_uri must match the one submited at the beginning of the auth request. This endpoint uses Basic Authorization. The username is your Client ID and the password is your Client Secret. An example of this grant type is found [here](https://support.boxc.com/support/solutions/articles/65000182701-request-authorization-from-a-boxc-account). Example request: ```text POST /auth/v1/token HTTP/1.1 Host: accounts.boxc.com Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ= Content-Type: application/x-www-form-urlencoded grant_type=authorization_code code=8de3a284c25392b474b453b6068e00f1e4f0b617 redirect_uri=https://www.myapp.com/auth?provider=boxc ``` Response: ```json { "token_type": "Bearer", "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImFkODQ3YjJkZTNmMTY1NjFlMDg3MDJhNjY2Mjc1MWMzOGVlODc0ZjcifQ.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjkwMDEiLCJhdWQiOiIxMDAwMDAwMDAwMTY2NDM0NTY5MiIsImlhdCI6MTY2NDkxMjY1MCwiZXhwIjoxNjY1NTE3NDUwLCJlbWFpbCI6Imp1c3RpbkBib3hjLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZmFtaWx5X25hbWUiOiJQb3BlIiwiZ2l2ZW5fbmFtZSI6Ikp1c3RpbiIsIm5hbWUiOiJKdXN0aW4gUG9wZSIsImxvY2FsZSI6ImVuIiwic3ViIjoiMSIsInpvbmVpbmZvIjoiQW1lcmljYS9OZXdfWW9yayJ9.T9C6Ik5gdVd7faTxmXy6q7s1sSnxNOVvMTXEFryii8ADFZsHL7SoDEj_9nGFrBq1mo5ra3mK9q7vr7gzk1NxJouHYjVVcO_CFKRK13Tj962_Tx7XiPlRe0eXDpIabT5HbfegI4P9ksiLBY8i79Z1PRmaTsjgy6cOJhkIz0gJOjeJmwMV6U5XwBAbFkmya6an2wujD7bJdJ7R_IZVWP8czdo779NYHhJ8cV-VdXKkpIW0HvPGBH_ZHFg3NE4TzSumdGVhohucKBCRnOoGAI5sEao0yLI01ZrsIqzdoxmWJvg75UM6JBVmvq5CGCWj0rVorSEaP639lM89W_fxrJaT3w", "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImFkODQ3YjJkZTNmMTY1NjFlMDg3MDJhNjY2Mjc1MWMzOGVlODc0ZjcifQ.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjkwMDEiLCJpYXQiOjE2NjQ5MTI2NTcsImV4cCI6MTk4MDI3MjY1NywiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDoxMDAwMCIsInN1YiI6IjEiLCJjbGllbnRfaWQiOiIxMDAwMDAwMDAwMTY2NDM0NTY5MiIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwifQ.QyiHKRLI8J8Kmb2lR4m53BaiOJrpm1JaRUrYCnatuJbamXQKsURwyUbCD1zSYIKCLVmafmIlQFx_CwUNg7ocplQVbJ-Bg9XlY3z2WFZbdM19i1ufgtCz854sfd6dUMbmaa-DQEtBMNC6pSOtfm_SQFkIg8gHxTvlV-TjJf6HhvtcBfkZD8WAHQ1ifK2KZ4W-cPEqj_hy62rxBN_u0RrJt4AYaUEyPLI_0qt2ta3HfPBg4Ef2VoNEE1alIDoyl_Sxruk0RRNV3FUoeoaexc4dRwxEp3q-sTXhj4fA3g7qjoo5-K8mzwQAogjqmy0aDcbpyBy9B4nFU5GWT_A9-yVtZA", "expires_in": 315360000 } ``` You may also authenticate with client credentials to receive an Access Token for the client owner's account by using the **client_credentials** grant type. This is useful for integrations that only need access to their own resources. The scope is inherited from the client settings. This endpoint uses Basic Authorization. The username is your Client ID and the password is your Client Secret. Example request: ```text POST /auth/v1/token HTTP/1.1 Host: accounts.boxc.com Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ= Content-Type: application/x-www-form-urlencoded grant_type=client_credentials ``` Response: ```json { "token_type": "Bearer", "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImFkODQ3YjJkZTNmMTY1NjFlMDg3MDJhNjY2Mjc1MWMzOGVlODc0ZjcifQ.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjkwMDEiLCJpYXQiOjE2NjQ5MTI2NTcsImV4cCI6MTk4MDI3MjY1NywiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDoxMDAwMCIsInN1YiI6IjEiLCJjbGllbnRfaWQiOiIxMDAwMDAwMDAwMTY2NDM0NTY5MiIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwifQ.QyiHKRLI8J8Kmb2lR4m53BaiOJrpm1JaRUrYCnatuJbamXQKsURwyUbCD1zSYIKCLVmafmIlQFx_CwUNg7ocplQVbJ-Bg9XlY3z2WFZbdM19i1ufgtCz854sfd6dUMbmaa-DQEtBMNC6pSOtfm_SQFkIg8gHxTvlV-TjJf6HhvtcBfkZD8WAHQ1ifK2KZ4W-cPEqj_hy62rxBN_u0RrJt4AYaUEyPLI_0qt2ta3HfPBg4Ef2VoNEE1alIDoyl_Sxruk0RRNV3FUoeoaexc4dRwxEp3q-sTXhj4fA3g7qjoo5-K8mzwQAogjqmy0aDcbpyBy9B4nFU5GWT_A9-yVtZA", "expires_in": 315360000 } ``` ## POST accounts.boxc.com/auth/v1/revoke Removes a previously authorized user-client connection. The sub in the request body matches the sub in the JWT and is the same thing as the user ID. This endpoint uses Basic Authorization. The username is your Client ID and the password is your Client Secret. Example request: ```text POST /auth/v1/token HTTP/1.1 Host: accounts.boxc.com Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ= Content-Type: application/x-www-form-urlencoded sub=198210 ``` Response: ```text HTTP/1.1 200 OK ``` - name: CarrierCredentials x-displayName: Credentials description: | Some of the integrations support using your own account credentials with carriers while creating shipments and manifests. The parameters are different depending on the carrier. You can create a [Credential](/#tag/Credentials) and use it when creating shipments. | Name | Carrier Code | Parameters | |------|---------------------------|------------| | Australia Post | `AUSPost` |
api_keyString - API key assigned by AUSPost.
api_passwordString - API password assigned by AUSPost.
account_numberString - Charge account number assigned by AUSPost.
| | Deutsche Post | `DeutschePost` |
gkp_usernameString - GKP username value. This is the username you use to login to DHL API Developer Portal. Not required for testing.
gkp_passwordString - GKP password value. This is the password you use to login to DHL API Developer Portal. Not required for testing.
dp_api_keyString - DeutschePost API Key that is created for you when you create an application via DHL API Developer Portal. Not required for testing.
dp_api_secretString - DeutschePost API Secret that is created for you when you create an application via DHL API Developer Portal. Not required for testing.
ekpString - EKP number that is assigned to you by DeutschePost. Not required for testing.
contract_participationString - Contract participation value that is assigned to you by DeutschePost. Not required for testing.
| | DHL eCommerce | `DHLeC` |
client_idString - Client ID that is assigned to you by DHL. Not required for testing.
client_secretString - Client Secret value that is assigned to you by DHL. Not required for testing.
| | DHL Express | `DHL Express` |
api_usernameString - API Username assigned to you by DHL. Not required for testing.
api_passwordString - API Password that is assigned to you by DHL. Not required for testing.
| | Janio | `Janio` |
api_keyString - API key assigned to you by Janio. Not required for testing.
| | Poste Italiane | `PosteItaliane` |
client_idString - Client ID assigned by Poste Italiane.
client_secret_idString - Client Secret ID assigned by Poste Italiane.
cost_centerString - Cost Center assigned by Poste Italiane.
| | PostNL | `PostNL` |
api_keyString - API key assigned by PostNL.
customer_codeString - 4 character customer code assigned by PostNL.
customer_numberString - 8 digit customer number assigned by PostNL.
| | Saudi Post | `SPL` |
usernameString - API username assigned by SPL.
passwordString - API password assigned by SPL.
| | Sky Postal | `SkyPostal` |
app_keyString - API app_key assigned by SkyPostal.
user_keyString - API user_key assigned by SkyPostal.
user_codeString - API user_code assigned by SkyPostal.
| - name: CarrierParameters x-displayName: Parameters description: | Some carriers accept custom parameters for additional configuration. These dynamic fields provide a way to extend the integration by passing options directly to the carrier while creating shipments. Parameters may be added, removed, or changed in the future to accommodate upstream changes by the carriers and our own integrations. | Name | Carrier Code | Parameters | |------|---------------------------|------------| | Deutsche Post | `DeutschePost` |
receiver_idString - Receiver ID is found in Post & DHL Business Customer Portal under the menu item "Returns" > "Settings" under the entry "Receiver ID". Required for return shipments. Not required for testing.
label_formatString - Printed label will be in the provided format. Accepted values:
| | DHL eCommerce | `DHLeC` |
pickup_idString - DHL eCommerce pickup account number. You will receive this after on-boarding with DHL eCommerce Solutions sales and customer implementation team. This is not the same as the Sold To Account number. Not required for testing.
distribution_centerString - Primary DHL eCommerce Distribution center assigned to your products/services. This is the distribution center where your packages are going to be lodged after pickup. Not required for testing.
| | DHL Express | `DHL Express` |
shipping_account String - Shipper Account Number.
ddp_account String - Duties and Taxes Account Number.
documents Object
| | Pos Malaysia | `PosMalaysia` |
ppi_number String - PPI Number assigned by the carrier in the format of 'PMK9999'.
| | Poste Italiane | `PosteItaliane` |
contract_codeString - Contract Code assigned by Poste Italiane.
customer_codeString - Customer Code assigned by Poste Italiane.
| | Saudi Post | `SPL` |
customer_codeString - Customer code assigned by SPL.
branch_codeString - Primary branch code assigned to your account.
| | Sky Postal | `SkyPostal` |
copa_idString - COPA ID assigned by SkyPostal.
box_idString - Box ID assigned by SkyPostal which is based on the destination country.
| - name: Changelog x-displayName: Changelog description: |
Date Version Changes
2026-07-11 1.123 Added
  • freight_charge to Shipments.
2026-06-30 1.122 Changed
  • Webhook key max length to 40.
2026-06-26 1.121 Added
  • CPSC: compliance to shipment.line_items[] for supporting additional fields for customs compliance.
  • Webhooks: clients may now subscribe multiple addresses to the same topic and user.
Changed
  • Error code 1401
2026-06-15 1.120 Added
  • longitude and latitude to Tracking Events.
  • images[] to the shipments_status Webhook.
  • Event code 250 for PROOF OF DELIVERY.
2026-06-01 1.119 Added
  • Janio credentials support.
2026-05-12 1.118 Added
  • A new resource Calculate Duty for calculating the landed cost of a shipment. Clients must generate a new token with the calculate scope included in order to use the new resource.
2026-04-11 1.117 Added
  • packages[] to Shipments for creating multi-package shipments.
  • packages[] to Estimate.
  • PATCH /labels/{id} for overpacking and cancelling labels (packages).
  • length, width, height, weight, overpack_id, is_master, and contents[] to Labels.
  • Error codes 1208, 1230, 1276, 1277
Deprecated
  • The PUT /labels/{id}/cancel endpoint.
  • The ability to remove a shipment from an overpack using the PUT /shipments/{id} endpoint.
2026-03-29 1.116 Added
  • nature_type to Shipments for post.
2026-03-26 1.115 Added
  • Error Code 1463
Changed
  • The Customs Product type is now immutable.
2026-03-18 1.114 Added
  • fsvp_importer to Customs Products.
  • FSX as an option to affirmation_of_compliance in Customs Products.
2026-03-12 1.113 Added
  • Certified Accounts may inject up to 100 tracking events at once using the /track endpoint.
  • Error code 1211
2026-02-25 1.112 Added
  • cod property to Shipments for optional Cash on Delivery (COD).
2026-02-11 1.111 Changed
  • Requests no longer require the `X-BoxC-Client-Id` header.
2026-02-01 1.110 Changed
  • The contact property is required for Customs Products.
2026-01-29 1.109 Changed
  • Max length of all street1 and street2 properties increased to 50 characters.
2025-11-14 1.108 Added
  • compliance property to Shipments. Available to qualified parties.
  • tracking_number to Shipments. Available to qualified parties.
2025-10-24 1.107 Added
  • wholesale property to Orders.
  • PosMalaysia carrier parameters support.
2025-10-07 1.106 Added
  • Poste Italiane credentials support.
  • Poste Italiane carrier parameters support.
2025-08-30 1.105 Added
  • Customs Products - manage products that can be assigned to shipment line items for customs clearance.
  • product_id and user_hts_code to shipment.line_items[]
  • Error codes: 1228, 1460, 1461, 1462
2025-06-25 1.104 Added
  • Australia Post, Sky Postal and PostNL credentials support.
  • Sky Postal carrier parameters support.
2025-05-06 1.103 Removed
  • The ability to manage Subscriptions from the API (POST, PUT, DELETE). Subscriptions can still be viewed but users must manage them in their account's dashboard.
  • Error codes: 1100, 1101, 1102, 1103, 1104
2025-04-25 1.102 Added
  • supplier to shipment.line_items[]. It's conditional and depends on several factors.
  • supplier to Products.
  • Error code 1227.
2025-03-26 1.101 Added
  • images to Shipments for listing URLs of images containing proof of delivery and processing scans.
  • images to the Track endpoint. This information is only available to the consignee or shipment owner.
  • has_images to Track endpoint indicating a shipment has images that can be revealed when unlocked.
2025-03-10 1.100 Added
  • Shipments verifies total line item weight doesn't exceed shipment weight.
  • Error code 1226
2025-01-24 1.99 Added Changed
  • Max length of shipment.line_items[].hts_code increased to 13.
  • Deprecated type86 in Overpacks.
  • Error code 1502
  • Error code 1503
Removed
  • Error code 1504
2025-01-08 1.98 Added
2024-10-18 1.97 Changed
  • Error code 1503
Added
  • Error code 1504
2024-08-27 1.96 Changed
  • Clients may now also track shipments using the generic shipment label's tracking number.
2024-08-03 1.95 Added
  • Clients can print a generic shipment label by changing the Accept header when requesting a single shipment. This label is not the final mile label and should only be used for internal operations.
2024-07-31 1.94 Added
  • processed_at to Inbound Shipments.
2024-06-29 1.93 Changed
  • Reverted last update. quantity property is now available for all search results.
2024-06-24 1.92 Changed
  • The quantity is no longer shown when filtering Products by shop.id or sku.
2024-06-12 1.91 Added
2024-05-10 1.90 Added
  • X-Request-Id to response headers
  • total_paid and total_billed to Invoices
  • timezone to Entry Points
  • forms to Manifests
  • events to Shipments that lists tracking events for the active label
  • Accept-Language header in requests will output errors in the preferred language if available. Currently only English (en-*) is supported.
  • route_heading and route_subheading to overpacks
  • warehouse property to order.fulfillments[]
  • error codes: 1001, 1081, 1082, 1202, 1213, 1253, 1254, 1404, 1405, 1425, 1500, 1501, 1502, 1503
Changed
  • Error response body; added errors property and removed http_status property
  • HTTP Status header for error responses now reflects the error message (e.g. 400, 403, 404, etc.)
  • Tracking events are no longer provided when listing/searching shipments
  • manifest overpacks to include all details of the overpacks
  • manifest overpacks_details is a clone of overpacks
  • error codes: 1403, 1352
Removed
  • shipping_methods and oversize_fee from Estimate resource
  • http_status from errors
  • address from Entry Points
  • oversize_fee from Labels
  • events from shipment.label
  • You can no longer search for Shipments using comments or to.name
  • connected, expires, settings.default_service, settings.packing_slip, and settings.partial_fulfillment from Shops
  • bulk printing products using the POST /products/barcodes endpoint
  • error codes: 1336
Deprecated
  • type from Shops
  • overpacks_details from Manifests
2023-12-06 1.89
  • Added: Credentials resource.
2023-11-03 1.88
  • Added: cost and total_cost to Estimate.
  • Deprecated: oversize_fee from all resources. Any oversize costs will be added to the surcharge.
  • Removed: tax from Estimate.
2023-10-16 1.87
  • Added: zonos_customer_id to Shipments.
2023-10-02 1.86
  • Removed: page, date_start, and date_end query parameters that were previously deprecated.
2023-09-22 1.85
  • Removed: Shopify as a shop type. Consider using a third party platform for integration your ecommerce shops with the BoxC API.
  • Deprecated: shop.settings.default_service
  • Deprecated: shop.settings.partial_fulfillment
  • Deprecated: shop.settings.packing_slip
  • Deprecated: shop.connected
  • Deprecated: shop.expires
2023-09-13 1.84
  • Added: ignore_bad_address to shipments and orders. Users may now ignore shipping address errors by setting ignore_bad_address to true. This also means the shipment will not include insurance coverage unless the shipment was verified.
2023-09-06 1.83
  • Removed: override from shipments and orders.
  • Removed: verified from shipments.
  • Removed: override_fee from labels.
2023-08-15 1.82
  • Added: created_min and created_max to Shipments and Orders search endpoints to replace date_start and date_end.
  • Added: error code 1031.
2023-08-14 1.81
  • Added: Track resource for tracking shipments.
2023-08-10 1.80
  • Added: Validate Address resource for validating postal addresses.
  • Added endpoint for processing shipments. Only authorized clients that process shipments at their facility have access.
  • Updated: error code 1009.
2023-07-29 1.79
  • Added: next_page to searchable API endpoints for paginating entities. See Paginate for information.
  • Added: page_token to query parameters when searching Shipments, Orders, etc. This will replace the page query parameter in a future update.
  • Added: error code 1025.
  • Deprecated: page from query parameters when searching. Use page_token instead.
  • Deprecated: date_start and date_end parameters from searchable endpoints.
  • Removed: the product hs_code property.
  • Removed: total_pages and the total count (e.g. total_shipments) from searchable API endpoints.
- name: CalculateDuty x-displayName: Calculate Duty description: Calculate the landed cost of a shipment. This is a quick way to calculate the duties and taxes owed for a shipment without having to create one. - name: Classify x-displayName: Classify description: The Classify resource permits a user to retrieve the most likely HS code and description for one or more products. Each successful request costs $0.05 (USD) regardless of the number of products. - name: Credentials x-displayName: Credentials description: |- The Credentials resource allows users to store their own carrier account secrets securely. This gives users the ability to reuse their credentials without providing actual secret values in every single shipment request. There can be multiple secret values stored in a single credential resource. Supported carriers and parameters can be found in the [Carrier Credentials](/#tag/CarrierCredentials) section. **Note:** All secret params that are stored by BoxC are encrypted at the storage layer using the Advanced Encryption Standard (AES) algorithm — AES-256. **Important:** Once a credential resource is created, it is not possible to see the secret values for security reasons. **Important:** If the secret values have to be updated for any reason, we recommend updating your existing Credential resource instead of creating a new one. Doing so will ensure that secret values are always up to date for previously created labels with the same Credential resource and event tracking is not affected adversely. - name: CustomsProducts x-displayName: Customs\Products description: | Not to be confused with Fulfillment [Products](/#tag/Products), Customs Products are for clearing shipments containing regulated items like Food and Cosmetics (PGA). Customs Products contain information about the item including the manufacturer, seller, importer, etc. Shipments that are determined to be PGA must provide the `product_id` in the line item. Manifesting PGA shipments will notify the relevant agencies. Several properties are conditional and offer different options based on the `coi` and `type` of product. **Important:** This resource and its operations are in Beta and subject to change without notice. - name: DangerousGoods x-displayName: Dangerous Goods description: | Below is a list of permitted dangerous goods and their respective codes. The "DG Code" is equivalent to a product or shipment's `dg_code`. Shipments and orders that contain dangerous goods have less services to choose from. | DG Code | Description | |---------|-------------| | 0965 | Lithium-ion Batteries Loose | | 0966 | Lithium-ion Batteries Packed with Equipment | | 0967 | Lithium-ion Batteries Contained in Equipment | | 0968 | Lithium metal Batteries Loose | | 0969 | Lithium metal Batteries Packed with Equipment | | 0970 | Lithium metal Batteries Contained in Equipment | | ORMD1 | ORM-D Dry Cell Batteries | | ORMD2 | ORM-D Liquid (Limited Quantity) | | ORMD3 | ORM-D Powder (Limited Quantity) | | SDEC1 | Dry Cell Batteries Contained in Equipment | | SDEC2 | Magnets Contained in Equipment | | SDEC3 | Beauty Products Containing Powder or Liquid | | SDEC4 | | - name: EntryPoints x-displayName: Entry Points description: | An entry point is the drop off location / origin for your shipments which affects your rates and the routes available. The `entry_point.id` is required when creating a shipment. You must query this endpoint to get an active list of entry points as some of added, changed, or removed. - name: Errors x-displayName: Errors description: | Below is a table of common errors that you may encounter in response to interacting with the API resources. Validation errors (code 1000) may provide multiple errors describing problems with the request schema. | Code | Message | |------|---------| | 1000 | Validation Error. %s | | 1001 | Server error. Try again later. | | 1002 | Requested language is not supported | | 1003 | Client is deleted | | 1004 | Client was deactivated by BoxC | | 1005 | Invalid access token | | 1007 | Client with that ID doesn't exist | | 1008 | Forbidden: Authorization revoked | | 1009 | Forbidden: Missing required scope '%s' | | 1010 | Service Unavailable: %s | | 1012 | Address Error: %s | | 1015 | Too many requests. Please wait before trying again. | | 1025 | Invalid page token | | 1031 | Query parameter '%s' is invalid | | 1040 | Entry point not found | | 1050 | No routes found | | 1051 | There was an error while fetching exchange rates | | 1080 | Insufficient funds | | 1081 | There was an error while fetching the account balance | | 1082 | There was an error while charging the account balance | | 1090 | Invoice not found | | 1120 | Return not found | | 1121 | Return must be processed before verifying | | 1122 | Return can't be discarded | | 1140 | Reshipment not found | | 1141 | Reshipment can't be updated | | 1142 | Reshipment can't be deleted | | 1143 | One or more returns can't be reshipped | | 1144 | Return can't be reshipped: %s | | 1145 | All returns must ship from the same warehouse | | 1200 | Shipping address not found | | 1201 | Shipment has uncancelled or processed labels | | 1202 | Shipment has no labels | | 1203 | Label could not be created: %s | | 1204 | Label was previously cancelled | | 1205 | Label not found | | 1206 | Label can't be cancelled | | 1207 | Label isn't ready for download yet | | 1208 | Use the master tracking number '%s' to cancel multi-package shipments | | 1210 | Shipment not found | | 1211 | Shipment not found or doesn't belong to user: %s | | 1212 | Shipment can't be deleted | | 1213 | Shipment can't be updated | | 1215 | Shipment requires an HS Code and description for all line items | | 1216 | Shipment entry point doesn't match the overpack | | 1217 | Shipment and overpack must use the same service | | 1218 | Shipments that are linked to an overpack can't be deleted | | 1219 | Duplicate shipment in overpack | | 1220 | Shipments to '%s' don't require a manifest | | 1221 | DG and non-DG shipments can't be mixed | | 1222 | Origin description for '%s' must be in the entry point's language | | 1223 | Description for '%s' isn't acceptable | | 1224 | HTS Code error: %s | | 1225 | Shipment was flagged as %s but no routes were found | | 1226 | Total line item weight is greater than the shipment weight | | 1227 | Supplier is required for %s | | 1228 | Item is PGA so a product_id is required for %s | | 1230 | Multi-package shipments can't be processed | | 1240 | Recipient is a denied party and can't be shipped to | | 1242 | Shipment contains prohibited/restricted goods | | 1243 | Unable to get tax and/or duty rates for this shipment | | 1250 | Overpack not found: %s | | 1251 | Overpack is locked | | 1252 | Overpack can't be created | | 1253 | Overpack can't be deleted | | 1254 | Overpack can't be updated | | 1270 | Overpack %s is empty | | 1271 | All overpacks must have the same entry point | | 1272 | Overpack %s was already used in another manifest | | 1273 | Overpack %s is missing weight or dimensions | | 1274 | Manifest could not be created | | 1275 | Manifest not found | | 1276 | All packages in shipment %s must be overpacked before manifesting | | 1277 | All packages in shipment %s must be manifested together | | 1320 | Order not found | | 1321 | Order can't be modified in its current state | | 1322 | Order can't be deleted | | 1323 | Order could not be created | | 1324 | Order could not be updated | | 1325 | Line items in the order must be unique | | 1326 | Duplicate shop.order_id '%s' | | 1330 | SKU '%s' does not exist in Shop '%s' | | 1331 | SKU is inactive: %s | | 1332 | Product not found | | 1333 | Product can't be deleted because it's being used | | 1334 | SKU '%s' for Shop '%s' is already in use | | 1335 | SKU can't be deleted | | 1337 | Only one SKU can be active for Product '%s' in Shop '%s' | | 1338 | Contact support to update barcode for Product '%s' | | 1339 | Product '%s' is missing warehouse description in the local language | | 1340 | Packing slip is required for a gift message | | 1341 | Packaging is not allowed in orders | | 1350 | Inbound shipment not found | | 1351 | Inbound shipment can't be deleted | | 1352 | Product '%s' can't be added | | 1353 | Inbound shipment can't be updated | | 1354 | Duplicate products in the shipment: %s | | 1360 | Warehouse not found | | 1370 | Shop not found | | 1371 | Shop can't be deleted | | 1372 | Shop can't be created | | 1373 | Shop ID is already in use | | 1374 | Shop %s is inactive | | 1400 | Webhook not found | | 1401 | Webhook with that address already exists | | 1402 | Webhook can't be created | | 1403 | Webhook can't be updated | | 1404 | Webhook can't be deleted | | 1405 | Webhook event can't be enqueued due to an error | | 1425 | Unable to validate address due to an error | | 1450 | Credential not found | | 1451 | Credential can't be updated | | 1452 | Credential can't be deleted | | 1453 | Credential could not be created | | 1454 | The carrier can't be changed | | 1460 | Customs Product not found | | 1461 | The product_id in %s was not found or may have been deleted | | 1462 | Product could not be added to the catalog | | 1463 | Product type can't be changed | | 1500 | Return address country must match shipping address country | | 1501 | Consignee country must match shipping address country | | 1502 | %s.name will not be accepted | | 1503 | %s.id is required for the country or service | - name: Estimate x-displayName: Estimate description: The Estimate resource allows a user to retrieve the estimated cost of shipping a package based on weight, dimensions, entry point, destination, and other parameters. No services will be returned if a route can't be matched against the provided parameters. - name: Inbound x-displayName: Inbound description: | The Inbound resource is part of the fulfillment component and allows customers to restock their products at warehouses operated by BoxC. An inbound shipment's products can't be modified after creation, but the warehouse, carrier, tracking number, and notes can be modified. ### Inbound Status The following table lists all possible states of an inbound shipment indicated by its `status` property. Only the system or warehouse can modify a shipment's status. | Status | Description | |--------|-------------| | Pending | The inbound shipment was created and may be en route to the warehouse. Default state. | | Received | The inbound shipment arrived at the warehouse. It can no longer be updated or deleted. | | Processed | The inbound shipment was processed and inventoried by the warehouse. | - name: Introduction x-displayName: Introduction description: | BoxC Logistics, Inc. provides a RESTful API to integrate seamlessly with other applications. All requests use the *application/json* content type unless specified and go over HTTPS. It's highly recommended that clients send an `Accept` header with their requests indicating the content type they're expecting to receive. ### Endpoint The API endpoint for both production and test resources is `https://api.boxc.com/v1`. The URI includes the major version of the API that you wish to use. In this case, it's `v1` for Version 1.x. ### Responses All responses from the server are in *application/json* format unless the requested resource supports other content types such as *application/pdf*. If there is an error the server will return an error code with a corresponding message describing the error. There is a [table of errors](/#tag/Errors) that explains what each error means in more detail. If you encounter an error take action immediately rather than resending the same request. If you receive a 500 Internal Server Error it means something went wrong on BoxC's end and we should be contacted. An output resulting from an error includes four properties: status, code, message, and errors. ```json { "status": "error", "code": 1200, "message": "Label could not be created", "errors": { "shipments/to/postal_code": "Invalid value" } } ``` ### Language Localization By default error responses are in English (`en`). Clients may request error messages in a different language by providing the `Accept-Language` header and an option from the [table of languages](/#tag/Languages). Often times raw error messages are returned directly from third party carrier APIs which may be in a different language than requested. ### Routines In order to reduce unnecessary clutter the system will routinely purge unused data. Below is a list of objects that should be considered ephemeral and not relied upon. - Test shipments and their labels that are older than 30 days. - Shipments with no labels that are older than 30 days. - Cartons with no shipments that are older than 30 days. - Orders not fulfilled and older than 1 year are deleted. - Inbound shipments 3 years and older are deleted. - Fulfilled orders are moved to an Archived state after 90 days. ### Timezone All datetimes in the responses are in UTC unless specified otherwise. Tracking events are displayed in the scan location's local timezone. ### Addresses There are several addresses involved with the shipping process that are described below to help the user differentiate between them. It's important to understand all of them because any mistakes may cause shipments to be delayed or never reach the recipient. #### Consignor (Seller) Address The company address is required before creating shipments (see [Users](/#tag/Users)). This is the same thing as the `consignor`, and it will be used by default if the user does not provide the `consignor` property for an individual shipment. If a user is shipping packages for multiple people but does not want their own company address listed as the `consignor` for Customs purposes they should use the consignor property to identify the sender. #### To (Shipping) Address The `to` address is the shipping address; it should be the final location of the shipment. In most cases it's the same as the consignee address. An error is returned when the address can't be validated and/or verified. #### From (Return) Address The `from` address is the return address the sender wishes to have their shipment returned to in case there is a problem with the delivery. This is not the same thing as the `consignor` but it can be the same address if needed. Shipments will use an address provided by BoxC if one isn't given. Return and shipping address countries must match. #### Consignee (Buyer) Address The `consignee` is the buyer of the goods. In most cases this is the same as the shipping address so the shipment will use that as the consignee address by default if one isn't provided. The consignee and shipping address country codes must be the same. - name: Invoices x-displayName: Invoices description: Invoices and statements are generated weekly and include a summary of all transactions between the invoice's `start_date` and `end_date`. Users can export an itemized list of all transactions for a billing period in their account. - name: Labels x-displayName: Labels description: The Labels resource allows a user to create, cancel, retrieve, and track labels for shipments. A label can't be created if there is already an uncancelled or processed label for the shipment. Labels that have been processed can't be cancelled. The user is responsible for paying the shipping costs if a label is cancelled but still processed at a facility. Test labels are routinely purged from the system. - name: Languages x-displayName: Languages description: | Below is a table of accepted languages. Provide the code from the table below in the `Accept-Language` header. | Language | Code | |----------|------| | English | en | - name: Manifests x-displayName: Manifests description: |- The Manifests resource is used for generating the paperwork required for dropping off Overpacks at a [collection center](/#tag/EntryPoints) or carrier facility at the end of the day. It also transmits the shipment data to the carrier(s) electronically. In order to create a manifest you must provide a list of the Overpacks that will be dropped off together. A manifest consists of all Shipments that are linked to each Overpack. **Note:** All overpacks in a manifest must have the same ```entry_point```, can't be empty, or missing weight and dimensions. Some manifests may have separate forms or no forms at all for the different carriers depending on the routes utilized by the affected shipments. Shipments should be sorted into Overpacks based on the carrier and other details prior to manifesting. Multiple copies of a form may exist for the driver and facility. **Note:** It can take up to several minutes before forms are available for download after manifesting because the required background tasks run asynchronously. **Important:** Once a manifest is created the associated overpacks and shipments can't be modified. - name: Orders x-displayName: Orders description: | The Orders resource allows you to create, read, update, and delete orders that are meant to be fulfilled by BoxC. If you wish to manually create an order for a third party shop you must provide the `shop.id` and `shop.order_id`. Neither property can be updated. The system will push tracking information to the shop when the order is fulfilled if both properties are set. Clients can force which warehouse is used for order fulfillment by setting the `warehouse.id` property. ### Order Status The following table lists all possible states of an order indicated by its `status` property. Updating an order that is 'Ready' will reset its status to 'Processing' and restore product quantities until it's processed by the system again. | Status | Description | |--------|-------------| | Backordered | There is insufficient quantity for one or more line items. The system will change the status once more inventory is added. | | Exception | There is a problem with the order such as missing or invalid information. The user must correct the problem before the order can be processed by the system. | | Holding | The order is being delayed from processing by the user. | | Processing | The order is waiting for the system to process it. Default state. | | Ready | The order is assigned to a warehouse for packing and quantities were deducted. | | Packing | One or more line items are being packed. It can't be edited in this state. | | Partial | The order was partially fulfilled. The remaining line items will be fulfilled when more inventory arrives. | | Fulfilled | The order was completely fulfilled. | | Archived | The system archives orders that were fulfilled at least 90 days in the past. | ### Pruning Orders The system routinely prunes or closes out orders in the system more than **365 days** ago. The start time is based on the `placed_at` and not the `created` datetime. What happens to the order depends on its current state at the time of pruning. - Unfulfilled (not Packing, Partial, Fulfilled) orders are deleted. - Partially fulfilled orders (Holding, Packing, Partial) are bumped to Fulfilled. - Orders in Packing have their unfulfilled line items and fulfillment objects deleted, and are bumped to Fulfilled. - name: Overpacks x-displayName: Overpacks description: |- The Overpacks resource allows a user to combine many Shipments into one object for faster clearance with BoxC and Customs. An overpack can be a carton, container, pallet, or bag. Regardless, it must contain an overpack label on the outside. Empty overpacks are routinely purged from the system. When creating an overpack it's recommended to provide one or more shipment ID, label ID, or tracking numbers in the request. The overpack will inherit the first shipment's (`n`) attributes like the `entry_point`, `service`, `terms`, etc. All shipments require identical attributes to be a part of the same overpack. Errors will be returned if the `n + 1` shipments do not match the first one. An error message will be present in the `shipments` array for each shipment that fails while creating or updating overpacks. Shipments that pass validation will still be added in the same request. The system will calculate the routing and other applicable carrier logic to determine the physical appearance of the label. Some carriers require custom messaging on the labels while others require a completely different label altogether. The system handles this logic on your behalf. **Note:** Shipments without labels and cancelled shipments can't be added to overpacks. The overpack(s) must be dropped off at the BoxC collection center indicated by the `entry_point`. Some entry points do not require overpacking and the system will prevent you from creating one. Deleting an overpack unassigns all shipments from it. **Note:** A client won't be able to print an overpack label until at least one shipment is assigned to it. - name: Paginate x-displayName: Paginate description: | When "searching" entities like Shipments and Orders there might be thousands of results. In order to reduce response time results are limited or "paged". Each response from the server will include the `next_page` property at the root level to assist in navigating to the next page of results. If no page exists after the current page then this property will be `null`. After making the initial query to an endpoint subsequent queries need only specify the `page_token` parameter in the request like below: ```text https://api.boxc.com/v1/shipments?page_token=ZGF0ZV9zdGFydD0yMDIzLTA0LTI5JmRhdGVfZW5kPTIwMjMtMDctMjgmbGltaXQ9NTAmb3JkZXI9ZGVzYyZsYWJlbGVkPSZwYWNrZWQ9JnBhZ2U9MSZwcm9jZXNzZWQ9Jmxhc3RfaWQ9ODIyMTE3OA== ``` This tells the API which page to load. You no longer need to pass every query parameter after the initial search since it's tokenized. Your application can temporarily cache the page tokens for navigating backwards or forwards as needed." - name: Products x-displayName: Products description: |- The Products resource allows users to add their products to the BoxC system. A product can have one or more Stock Keeping Units (SKUs). This gives users the ability to link their different shops' SKUs to the same product. There can only be one active SKU per shop per product. Orders won't be fulfilled until the warehouse accepts and processes your products. This includes measuring the weight and dimensions, and updating the quantity. **Note:** Products and SKUs linked to orders can't be deleted. Existing SKUs can't be assigned to a different shop. - name: RateLimit x-displayName: Rate Limits description: | This API utilizes rate limiting for requests. It uses the leaky bucket algorithm to calculate the amount of requests that are granted every second up to a maximum number of requests. All rate limits are currently calculated against a user's ID across all applications. By default users are limited to a maximum of 30 requests with 2 new requests added to the bucket every second. There is no limit on the aggregate number of requests that can be made. The API returns a JSON response with error code 1015 while the limit is temporarily exceeded. The response includes two header lines to assist developers in staying within their limits: ```text X-Rate-Limit: m X-Rate-Requests: p ``` Where `m` is the maximum requests or bucket size and `p` is the number of current requests. The number of remaining requests can be calculated as `m - p`. - name: Reshipments x-displayName: Reshipments description: |- The Reshipments resource allows you to reship one or more returned packages at a time from a BoxC warehouse. When a reshipment is created the `status` of all included returns will change to "Reshipping". Only returns with the following status can be reshipped: Processed, Verifying, and Verified. If reshipping more than one return at a time then you must wait for a facility operator to provide an `estimated_reship_fee`. If reshipping one return then the estimate will be instantaneous. In both cases you must approve the estimate before the reshipment is sent and your account is charged. **Note:** All returns in a bulk reshipment (> 1 return) must reside in the same warehouse. ### Status When a reshipment is created its status is set to "Pending" by default. It will remain that way until the `estimated_reship_fee` is populated by the system or facility operator. Afterwards, you have the option to approve or decline the amount by [updating](/#tag/Reshipments/operation/updateReshipment) the status accordingly. If "Declined", it will not be reshipped. If "Approved" it will be reshipped, tracking information will be made available, and a final reship_fee will be provided. Reshipments with the status "Approved" cannot be deleted. **Important:** Reshipments that are "Pending" or "Declined" longer than 15 days will be deleted by the system. **Note:** The final reshipping fee may differ from the estimated reshipping fee. - name: Returns x-displayName: Returns description: |- The Returns resource allows a user to retrieve a list of returned shipments processed at a BoxC warehouse. Users may verify, [reship](/#tag/Reshipments), or discard their returns. Discarding a return is irreversible. ### Verify Users have the option to verify a return before reshipping it. The facility operator will take additional pictures of the contents inside the return and add messages if necessary. To verify a return the user should PUT a `status` of "Verify". This will change the status of the return to "Verifying" which cannot be reversed. Only returns in the "Processed" state can be verified. - name: ReturnsProcess x-displayName: Returns Process description: | Diagram of the BoxC returns process. - name: Shipments x-displayName: Shipments description: | The Shipments resource allows a user to create, update, retrieve, and delete shipments. Only test shipments and shipments without labels can be deleted. Shipments with uncancelled or processed labels cannot be updated. All shipments require address verification on the shipping address. Cancelling a label will refund the cost. Test shipments and shipments without labels are routinely purged from the system. There are some weight and volumetric constraints for shipments that is dependant on the route. For example, if a Shipment's length + girth is greater than a certain size then the user is charged an additional fee per KG. The length is the measurement of the longest dimension, and girth is the distance around the thickest part (perpendicular to the length). If the Shipment's weight or volume exceeds the limit for a route an error will be returned. **Note:** Set the `overpack_id` to null when unassigning it from an overpack. You won't be allowed to update a labelled shipment beyond that. - name: Shops x-displayName: Shops description: The Shops resource allows a user to manage their fulfillment shop. A shop with orders or SKUs cannot be deleted. Clients should use a third party platform for integrating their ecommerce marketplaces with the BoxC API. - name: Track x-displayName: Track description: | The Track resource allows clients to retrieve tracking events for shipments by their tracking number. You may only track one shipment per request. This endpoint is rate limited. Some shipments may have images attached to them during transit such as processing scans and proof of delivery. To reveal these images in the response the client must either: A. Be the owner of the shipment;
B. Provide the shipping email address in the query;
C. Provide the postal code in the query if it's not revealed in the event history. - name: TrackingEvents x-displayName: Tracking Events description: | The following table is a list of events that you may encounter while tracking a shipment. BoxC merges each step of the shipping process (first, middle, and last miles) into a single tracking history sorted chronologically in descending order. All events from carriers are imported and mapped to a universal dictionary of events maintained by BoxC as shown below. Event times are in the scan location's timezone. | Code | Description | |------|-------------| | 100 | SHIPMENT LABEL CREATED | | 101 | ARRIVED FACILITY | | 102 | ARRIVED DESTINATION FACILITY | | 103 | ARRIVED SORT FACILITY | | 104 | ARRIVED POST OFFICE | | 105 | SHIPMENT ACCEPTANCE | | 106 | HELD AT FACILITY | | 109 | NOT RECEIVED | | 110 | RECEIVED | | 111 | DEPARTED FACILITY | | 112 | DEPARTED ORIGIN FACILITY | | 113 | DEPARTED SORT FACILITY | | 114 | DEPARTED POST OFFICE | | 120 | SORTING/PROCESSING COMPLETE | | 121 | PROCESSING EXCEPTION | | 130 | CUSTOMS PROCESSING | | 131 | CUSTOMS PROCESSING COMPLETE | | 132 | CUSTOMS ON HOLD | | 133 | CUSTOMS RELEASE | | 134 | CUSTOMS DELAY | | 135 | PROHIBITED ITEM/DANGEROUS GOODS | | 136 | TAX/DUTY PAYMENT REQUIRED | | 140 | UNKNOWN CONSIGNEE ID | | 150 | EN ROUTE | | 155 | DELAYED | | 160 | FORWARDED | | 161 | INTERCEPTED | | 190 | TENDERED TO AGENT | | 192 | DELIVERY SCHEDULED | | 193 | REMINDER TO SCHEDULE REDELIVERY | | 194 | REMINDER TO PICKUP | | 197 | DELIVERY DELAY | | 198 | OUT FOR DELIVERY | | 199 | DELIVERY STATUS NOT UPDATED | | 200 | DELIVERED | | 201 | DELIVERED FRONT DESK/RECEPTION | | 202 | DELIVERED FRONT DOOR/PORCH | | 203 | DELIVERED GARAGE/ALT LOCATION AT ADDRESS | | 204 | DELIVERED IN/AT MAILBOX | | 205 | DELIVERED INDIVIDUAL PICKED UP | | 206 | DELIVERED LEFT WITH INDIVIDUAL | | 207 | DELIVERED NEIGHBOR | | 208 | DELIVERED PARCEL LOCKER | | 209 | DELIVERED PO BOX | | 210 | DELIVERED TO/BY AGENT | | 211 | DELIVERED TO MAIL ROOM | | 212 | DELIVERED TO SENDER | | 220 | HELD AT POST OFFICE | | 225 | AVAILABLE FOR PICKUP | | 250 | PROOF OF DELIVERY | | 300 | NOTICE LEFT | | 301 | NO SUCH NUMBER | | 302 | NO SECURE LOCATION AVAILABLE | | 303 | NO AUTHORIZED RECIPIENT AVAILABLE | | 304 | MOVED | | 305 | MISSENT | | 306 | MIS-SHIPPED | | 307 | INSUFFICIENT ADDRESS | | 308 | FORWARD EXPIRED | | 310 | REFUSED | | 311 | UNCLAIMED | | 312 | UNDELIVERABLE AS ADDRESSED | | 313 | VACANT | | 314 | VISIBLE DAMAGE | | 315 | RETURN TO SENDER | | 316 | BUSINESS CLOSED | | 317 | DEAD LETTER | | 318 | ADDRESSEE UNKNOWN | | 319 | RECEPTACLE FULL/BLOCKED | | 320 | DESTROYED | | 321 | NO ACCESS | | 322 | DECEASED | | 323 | RECEPTACLE FULL/ITEM OVERSIZED | | 324 | ANIMAL INTERFERENCE | | 325 | REPORTED LOST | | 350 | CONTACT SELLER | - name: Users x-displayName: Users description: | The Users resources allows an application to retrieve information about the tokenized user such as balances, personal/company address, and subscriptions. Only the addresses can be updated by applications ### Subscriptions A subscription is a recurring payment for a provided service. The specified `amount` is deducted from the user's BoxC balance at the start of each `interval` - also known as `current_period_start`. - Applications can only view subscriptions that belong to them. - Subscriptions automatically renew each interval until cancelled. - Cancelling a subscription will flag it to be deleted after `current_period_end`. To save a subscription it must be renewed before `current_period_end`. - Subscriptions are automatically removed from the list if their `current_period_end` is less than the current time. - A subscription cannot be modified after creation - only renewed. - A subscription will not be renewed if the user has insufficient funds. - A subscription can only be cancelled by the user from their account's dashboard. - name: ValidateAddress x-displayName: Validate Address description: The Validate Address resource permits a user to validate and retrieve the most likely matches of provided postal addresses. Each successful validation costs $0.03 (USD). - name: Warehouses x-displayName: Warehouses description: | The Warehouses resource allows you to retrieve location and identity information for a single warehouse or all warehouses. You should query this endpoint to retrieve an active list of fulfillment warehouses that customers can send their products to restock their inventory. The ```warehouse.id``` is used for selecting the warehouse while creating an inbound shipment or an order. - name: Webhooks x-displayName: Webhooks description: | The Webhooks resource allows applications to subscribe to topics and receive events for users. Events are pushed to the webhook's `address` with a payload by issuing an HTTP POST request each time. **Note:** Webhook subscriptions are scoped only to the application that they're registered to which means other applications can't read, modify, or delete them. ### Address Rules To create a webhook you register a valid HTTP address for consuming the events. It can be updated at any time. An address is considered valid if it meets the following conditions: - Must be RFC compliant (include HTTP/S). - Must include a valid hostname (example: www.boxc.com). - Must include a path and can't be just a domain or IP address (example: http://boxc.com/path/to/script). - Can't include localhost in the hostname. - Must be less than or equal to 128 characters in length. ### HTTP Headers There are four additional HTTP headers added to the webhook event to aid applications in processing them. - **User-Agent** - Always "BoxC/1.0 Webhook" for filtering webhook requests. - **X-BoxC-Hmac-SHA256** - Base64 encoded HMAC digest. Useful for verifying the event is authentic (example: Ikaxp9lMrkNXb6kxVhYxxiYDZplIN1kQcHV6gK3duFk=). - **X-BoxC-Topic** - The subject of the event (example: shipments_status). - **X-BoxC-Account** - The user ID affected by the event (example: 9512). ### Verifying Events A `key` is required when creating a webhook. Every webhook has a `key` that is used to calculate the **X-BoxC-Hmac-SHA256** HTTP header by using the payload sent in the request. To verify the request came from BoxC, compute the HMAC digest using the SHA-256 hash function, encode it to [Base64](https://en.wikipedia.org/wiki/Base64), and compare it to the X-BoxC-Hmac-SHA256 header. Keys are provided by the application and must be between 16 and 32 characters long. They're not unique or immutable. ### Payloads The payload contains a JSON object with the data for the webhook event. The contents and structure of each payload varies depending on the topic. ### Responding to Webhooks The configured webhook `address` must respond with an HTTP Status between 200 and 299 (inclusive) to be considered successful. Any response outside the 200 range will result in a failed attempt and will be queued for three additional attempts within an hour before it's evicted. Requests made to the webhook address will not follow any redirects. The `address` must connect within 2 seconds and respond within 4 seconds overall or it will be considered a failed attempt. If you believe it will take longer than 4 seconds to respond then you should process the request asynchronously after responding with 200 OK. BoxC uses an exponential backoff timer for calculating the next attempt and will continue to retry three more times. Webhook addresses that don't respond with a successful status 1000 consecutive times are deactivated until the client updates the malfunctioning webhook. An email is sent to the OAuth client when a webhook is deactivated. ### Testing Webhooks Applications can test their integration by POSTing an event to a webhook they manage. The same event will be injected into the queue and subsequently POSTed to the webhook's configured address without any alterations. A fake payload from one of the topics below can be used as a template and modified to test the different stages of an object's lifecycle. The event's payload must match the topic's schema the webhook is subscribed to. ### Topics Listed below are the current topics and their respective event structures that users may subscribe to. #### fulfillments_complete This event is triggered when a fulfillment is fulfilled and finalized at a warehouse. Tracking numbers will be provided in most cases, but sometimes there's a delay from the carrier - users should subscribe to `fulfillments_update` to handle this scenario. ```json { "fulfillment": { "id": 619231, "line_items": [ { "product_id": 121000, "quantity": 2, "sku": "MYSKU123" } ], "order_id": 600001, "service": "BoxC Parcel", "shipment_id": 1521231, "shop": { "id": "my-test-shop", "order_id": "#1002" }, "tracking_number": null, "tracking_url": null, "warehouse_id": "WH0HKG01" } } ``` #### fulfillments_update This event is triggered when a fulfillment's tracking information is updated by the carrier after it was already completed. Some carriers don't provide a tracking number immediately. ```json { "fulfillment": { "id": 619231, "order_id": 600001, "service": "BoxC Parcel", "shipment_id": 1521231, "shop": { "id": "my-test-shop", "order_id": "#1002" }, "tracking_number": "9261290185965500000103", "tracking_url": "https:\/\/track.boxc.com\/?id=9261290185965500000103", "warehouse_id": "WH0HKG01" } } ``` #### manifests_complete This event is triggered when a manifest finished processing and any related PDF documents are available for download. ```json { "manifest": { "created": "2022-08-02 12:12:12", "entry_point": "LAXI01", "exit_point": "SYD", "id": 909447, "forms": [ "Toll_IPEC.pdf" ], "mawb_id": null, "overpacks": [ { "carrier": "Toll", "created": "2021-08-01 00:26:05", "height": 10, "id": 1002730, "length": 10, "service": "BoxC Parcel", "terms": "DDU", "type86": false, "weight": 5, "width": 10 } ], "total_shipments": 4, "warehouse_no": "02599225803" } } ``` #### orders_status This event is triggered when an order's status changes. Only orders updated to "Exception" will trigger this event. ```json { "order": { "created": "2020-02-27 12:12:12", "id": 1831488, "line_items": [ { "product_id": 123456, "sku": "sku123", "quantity": 1 } ], "placed_at": "2020-02-27 15:15:15", "service": "BoxC Priority", "status": "Exception", "shipping_address": { "company_name": null, "phone": null, "email": null, "name": "John Smith", "street1": "555 5TH AVE", "street2": null, "city": "NEW YORK", "province": "NY", "postal_code": "10001", "country": "US" }, "shop": { "id": "my-test-shop", "order_id": "123456" } } } ``` #### shipments_label This event is triggered when a label is generated in the BoxC system. In most cases this webhook will immediately fire off during shipment creation. However, some carriers provide shipping labels asynchronously so they won't be available after creating a shipment. They make take anywhere from a few seconds to a few minutes to be ingested into our system. The `shipment.data` is a base 64 encoded string that must be decoded before saving as the indicated `content_type`. All label data will be sent as "application/pdf". ```json { "shipment": { "carrier": "Janio", "content_type": "application\/pdf", "data": "aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g\/dj1kUXc0dzlXZ1hjUQ==", "id": 1521231, "tracking_number": "9261290185965500000103" } } ``` #### shipments_status This event is triggered when a new tracking event is injected. The tracking event along with some shipment details is sent to the subscribed webhooks. ```json { "shipment": { "chargeable_weight": 0.4, "comments": [ "Order123456" ], "entry_point": "TEST01", "event": { "carrier": "USPS", "code": 200, "city": "AUSTIN", "province": "TX", "postal_code": "78701", "country": "US", "time": "2019-10-10 12:12:12", "longitude": null, "latitude": null }, "exit_point": "DFW", "gross_weight": 0.235, "id": 1521231, "images": { "pod": [], "scans": [] }, "order_number": null, "service": "BoxC Parcel", "status": "Delivered", "tracking_number": "9261290185965500000103", "volumetric_weight": 0.4 } } ``` paths: /calculate-duty: post: tags: - CalculateDuty summary: POST /calculate-duty description: Calculate the landed cost of a shipment. operationId: calculateDuty consumes: - application/json produces: - application/json security: - JWT: - calculate x-badges: - name: Beta position: after x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/calculate-duty \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "calculate": { "currency": "USD", "shipping": 0, "insurance": 0, "origin": { "country": "GB" }, "destination": { "province": "NY", "country": "US" }, "products": [ { "coo": "GB", "value": 10, "currency": "GBP", "quantity": 20, "hs_code": "6109100040", "description": "Cotton T-Shirt" } ] } }' requestBody: content: application/json: schema: type: object properties: calculate: $ref: '#/definitions/CalculateDuty' required: - calculate responses: '200': description: OK content: application/json: schema: type: object properties: calculate: $ref: '#/definitions/CalculateDuty' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'calculate/origin/country: Required' status: error errors: - calculate/origin/country is required '401': $ref: '#/definitions/Unauthorized' '402': $ref: '#/definitions/PaymentRequired' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Service Unavailable value: code: 1010 message: Service Unavailable errors: - Service Unavailable chargingError: summary: Internal Server Error - Charging Account description: Unable to deduct amount from balance value: code: 1010 message: Unable to deduct amount from balance errors: - Unable to deduct amount from balance /classify: post: tags: - Classify summary: POST /classify description: Get HS codes and descriptions for products. Accurate HS codes are required for customs clearance. operationId: addClassify consumes: - application/json produces: - application/json security: - JWT: - classify x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/classify \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "classify": { "destination_country": "US", "origin_country": "CN", "products": [ { "hs_code": "610610", "description": "Sports Bra" } ] } }' requestBody: content: application/json: schema: type: object properties: classify: $ref: '#/definitions/Classify' required: - classify responses: '200': description: OK content: application/json: schema: type: object properties: classify: $ref: '#/definitions/Classify' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'classify/origin_country: Required' status: error errors: - origin_country is required hsCode: summary: Missing Requirements description: An HS Code and description are required for all products. value: code: 1215 message: Shipment requires an HS Code and description for all line items errors: - Shipment requires an HS Code and description for all line items '401': $ref: '#/definitions/Unauthorized' '402': $ref: '#/definitions/PaymentRequired' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Service Unavailable value: code: 1010 message: Service Unavailable errors: - Service Unavailable chargingError: summary: Internal Server Error - Charging Account description: Unable to deduct amount from balance value: code: 1010 message: Unable to deduct amount from balance errors: - Unable to deduct amount from balance /credentials: get: tags: - Credentials summary: GET /credentials description: Retrieves a paginated list of credentials. operationId: getCredentials consumes: - application/json produces: - application/json parameters: - in: query name: limit description: The number of results to return. default: 50 minimum: 50 maximum: 100 required: false type: integer - in: query name: order description: The sort order of the results. default: desc enum: - asc - desc required: false type: string - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string default: null - in: query name: sort description: The property to sort by. enum: - id - carrier default: id required: false type: string security: - JWT: - read_credentials x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/credentials\?limit=2\&order=desc\&sort=id responses: '200': description: OK content: application/json: schema: type: object properties: credentials: type: array items: $ref: '#/definitions/Credential' next_page: type: string description: Page token. Set by the system. example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Credentials summary: POST /credentials description: Creates a credential. operationId: addCredential consumes: - application/json produces: - application/json security: - JWT: - write_credentials x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/credentials \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "credential": { "carrier": "DeutschePost", "params": { "gkp_username": "Username", "gkp_password": "Password", "dp_api_key": "TEST", "dp_api_secret": "TEST", "ekp": "1234567890", "contract_participation": "AA" } } }' requestBody: content: application/json: schema: type: object properties: credential: $ref: '#/definitions/Credential' required: - credential responses: '201': description: Created content: application/json: schema: type: object properties: credential: $ref: '#/definitions/Credential' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /credential: The required properties (carrier) are missing' status: error errors: - '/credential: The required properties (carrier) are missing' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Credential could not be created value: code: 1453 message: Credential could not be created errors: - Credential could not be created /credentials/{id}: get: tags: - Credentials summary: GET /credentials/{id} description: Retrieves a credential. operationId: getCredentialsById consumes: - application/json produces: - application/json security: - JWT: - read_credentials parameters: - name: id in: path description: The credential ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/credentials/{id} responses: '200': description: OK content: application/json: schema: type: object properties: credential: $ref: '#/definitions/Credential' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Credential not found value: code: 1450 message: Credential not found errors: - Credential not found '429': $ref: '#/definitions/RateLimit' put: tags: - Credentials summary: PUT /credentials/{id} description: Updates a credential. operationId: updateCredential consumes: - application/json produces: - application/json security: - JWT: - write_credentials parameters: - name: id in: path description: The credential ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/credentials/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "credential": { "carrier": "DeutschePost", "params": { "gkp_username": "Username", "gkp_password": "Password", "dp_api_key": "TEST", "dp_api_secret": "TEST", "ekp": "1234567890", "contract_participation": "AA" } } }' requestBody: content: application/json: schema: $ref: '#/definitions/CredentialPut' responses: '200': description: Success OK. content: application/json: schema: type: object properties: credential: $ref: '#/definitions/Credential' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'params: Params are not valid' status: error errors: - 'params: Params are not valid' cannotUpdate: summary: Bad Request Credential description: Credential can't be updated value: code: 1451 message: Credential can't be updated errors: - Credential can't be updated cannotChangeCarrier: summary: Bad Request Carrier description: Carrier can't be changed value: code: 1454 message: Carrier can't be changed errors: - Carrier can't be changed '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Credential not found value: code: 1450 message: Credential not found errors: - Credential not found '429': $ref: '#/definitions/RateLimit' delete: tags: - Credentials summary: DELETE /credentials/{id} description: Deletes a credential. operationId: deleteCredential consumes: - application/json produces: - application/json security: - JWT: - write_credentials parameters: - name: id in: path description: The credential ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/credentials/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Credential not found value: code: 1450 message: Credential not found errors: - Credential not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Credential can't be deleted value: code: 1452 message: Credential can't be deleted errors: - Credential can't be deleted /customs/products: get: tags: - CustomsProducts summary: GET /customs/products description: Retrieves a paginated list of customs products. operationId: getCustomsProducts consumes: - application/json produces: - application/json parameters: - in: query name: limit description: The number of results to return. default: 50 minimum: 50 maximum: 100 required: false type: integer - in: query name: order description: The sort order of the results. default: desc enum: - asc - desc required: false type: string - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string default: null security: - JWT: - read_shipments x-badges: - name: Beta position: after x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/customs/products\?limit=50\&order=desc responses: '200': description: OK content: application/json: schema: type: object properties: products: type: array items: $ref: '#/definitions/CustomsProduct' next_page: type: string description: Page token. Set by the system. example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - CustomsProducts summary: POST /customs/products description: Creates a customs product. operationId: addCustomsProduct consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-badges: - name: Beta position: after x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/customs/products \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "product":{ "coo": "CN", "coi": "US", "code": "1231-21", "contact: { "name": "John Doe", "email": "john@doe.com", "phone": "1231231234" }, "brand_name": "Tyson", "description": "Chicken wings", "packaging": { "type": "BAG", "quantity": 1 }, "quantity": 1, "uom": "PCS", "type": "FOO", "processing_code": "PRO", "intended_use_code": "210.000", "prior_notice_submitter": { "use_consignor": true }, "affirmation_of_compliance":[ { "code": "FME", "value": "K" } ], "manufacturer": { "use_consignor": false, "id": { "type": "DUNS", "value": "16324234" }, "address": { "name": "hey", "street1": "123 main st", "city": "Dallas", "province": "TX", "postal_code": "75325", "country": "US" } }, "importer": { "use_consignor": true }, "shipper": { "use_consignor": true } } }' requestBody: content: application/json: schema: type: object properties: product: $ref: '#/definitions/CustomsProduct' required: - product responses: '200': description: Success OK. content: application/json: schema: type: object properties: product: $ref: '#/definitions/CustomsProduct' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /product/type: Product type must be one of [FOO, COS, FOO-CCW]' status: error errors: - '/product/type: Product type must be one of [FOO, COS, FOO-CCW]' cannotAdd: summary: Bad Request description: Product can't be created value: code: 1462 message: Product could not be added to the catalog errors: - Product could not be added to the catalog '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /customs/products/{id}: get: tags: - CustomsProducts summary: GET /customs/products/{id} description: Retrieves a customs product. operationId: getCustomsProductById consumes: - application/json produces: - application/json security: - JWT: - read_shipments x-badges: - name: Beta position: after parameters: - name: id in: path description: The product ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/customs/products/{id} responses: '200': description: OK content: application/json: schema: type: object properties: product: $ref: '#/definitions/CustomsProduct' required: - product '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Customs Product not found value: code: 1460 message: Customs Product not found errors: - Customs Product not found '429': $ref: '#/definitions/RateLimit' put: tags: - CustomsProducts summary: PUT /customs/products/{id} description: Updates a customs product. operationId: updateCustomsProduct consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-badges: - name: Beta position: after parameters: - name: id in: path description: The product id. required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/customs/products/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "product":{ "coo": "CN", "coi": "US", "code": "1231-21", "brand_name": "Tyson", "contact": { "name": "John Doe", "email": "john@doe.com", "phone": "1231231234" }, "description": "Chicken wings", "packaging": { "type": "BAG", "quantity": 1 }, "quantity": 1, "uom": "PCS", "type": "FOO", "processing_code": "PRO", "intended_use_code": "210.000", "prior_notice_submitter": { "use_consignor": true }, "affirmation_of_compliance":[ { "code": "FME", "value": "K" } ], "manufacturer": { "use_consignor": false, "id": { "type": "DUNS", "value": "16324234" }, "address": { "name": "hey", "street1": "123 main st", "city": "Dallas", "province": "TX", "postal_code": "75325", "country": "US" } }, "importer": { "use_consignor": true }, "shipper": { "use_consignor": true } } }' requestBody: content: application/json: schema: type: object properties: product: $ref: '#/definitions/CustomsProduct' required: - product responses: '200': description: Success OK. content: application/json: schema: type: object properties: product: $ref: '#/definitions/CustomsProduct' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /product/type: Product type must be one of [FOO, COS, FOO-CCW]' status: error errors: - '/product/type: Product type must be one of [FOO, COS, FOO-CCW]' cannotUpdate: summary: Bad Request description: Product can't be updated value: code: 1462 message: Product could not be added to the catalog errors: - Product could not be added to the catalog cannotChangeType: summary: Immutable Type description: Product type can't be changed value: code: 1463 message: Product type can't be changed errors: - Product type can't be changed '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Customs Product not found value: code: 1460 message: Customs Product not found errors: - Customs Product not found '429': $ref: '#/definitions/RateLimit' delete: tags: - CustomsProducts summary: DELETE /customs/products/{id} description: Deletes a customs product. It is only a soft delete since products may still be referenced from shipments. operationId: deleteCustomsProduct consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-badges: - name: Beta position: after parameters: - name: id in: path description: The product ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/customs/products/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Customs Product not found value: code: 1460 message: Customs Product not found errors: - Customs Product not found '429': $ref: '#/definitions/RateLimit' /entry-points: get: tags: - EntryPoints summary: GET /entry-points description: Retrieves a list of entry points. operationId: getEntryPoints consumes: - application/json produces: - application/json security: - JWT: [] x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/entry-points responses: '200': description: OK content: application/json: schema: type: object properties: entry_points: type: array items: $ref: '#/definitions/EntryPoint' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /entry-points/{id}: get: tags: - EntryPoints summary: GET /entry-points/{id} description: Retrieves an entry point. operationId: getEntryPointsById consumes: - application/json produces: - application/json security: - JWT: [] parameters: - name: id in: path description: The entry point ID required: true type: string minLength: 6 maxLength: 6 x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/entry-points/{id} responses: '200': description: OK content: application/json: schema: type: object properties: entry_point: $ref: '#/definitions/EntryPoint' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Entry point not found value: code: 1040 message: Entry point not found errors: - Entry point not found '429': $ref: '#/definitions/RateLimit' /estimate: get: tags: - Estimate summary: GET /estimate description: Retrieves an estimate. operationId: getEstimate consumes: - application/json produces: - application/json security: - JWT: [] parameters: - in: query name: carrier description: The preffered last mile carrier the shipment should use for delivery. required: false default: null type: string example: DHLeC - in: query name: country description: The destination country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. required: true minLength: 2 maxLength: 2 format: - A-Z type: string example: US - in: query name: currency description: The ISO 4217 currency code for the **value** parameter and rates that are returned. required: false default: USD minLength: 3 maxLength: 3 format: - A-Z type: string example: USD - in: query name: dg_codes description: A string or array of [dangerous good codes](/#tag/DangerousGoods) contained in the shipment. required: false type: string|array example: '0965' - in: query name: entry_point description: The code for the drop off location. See [Entry Points](/#tag/EntryPoints) for a list of codes. required: true type: string example: LAXI01 minLength: 6 maxLength: 6 - in: query name: exit_point description: The IATA port where the shipment should enter for last mile delivery. Providing this limits results to only those routes with the matching port. required: false default: null type: string example: JFK minLength: 3 maxLength: 3 - in: query name: height description: The height of the shipment in CM. required: false default: 1 type: decimal example: 10.5 - in: query name: insurance description: By default all shipments except for BoxC Post include insurance covering up to $30 of the total item value including shipping cost. Setting this to true will increase the insured value for an additional fee. required: false default: false type: boolean example: true - in: query name: irregular description: Indicates this shipment was packaged in irregular shaped polybag or soft packaging to assist in calculating the volumetric weight. required: false default: false type: boolean example: true - in: query name: is_return description: Indicates this shipment is a return. required: false default: false type: boolean example: true - in: query name: length description: The length of the shipment in CM. required: false default: 15 type: integer example: 25 - in: query name: packages type: array items: $ref: '#/definitions/PackageEstimate' maxItems: 12 default: [] - in: query name: postal_code description: The destination Postal Code or ZIP Code. Conditional. required: false type: string example: 10128 maxLength: 10 - in: query name: province description: The destination province / state code. Conditional. required: false type: string example: NY maxLength: 40 - in: query name: signature_confirmation description: The shipment requires signature confirmation. required: false default: false type: boolean example: true - in: query name: terms description: The preferred incoterms. enum: - DAP - DDU - DDP required: false default: null type: string example: DDU - in: query name: value description: The total value of the items to calculate tax and insurance. Used with currency. required: false default: 0 type: decimal example: 100 - in: query name: weight description: The weight of the shipment in KG. required: true exclusiveMinimum: 0 type: decimal example: 0.345 - in: query name: width description: The width of the shipment in CM. required: false default: 10 type: integer example: 2 x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/estimate\?entry_point=TEST01\&weight=0.345\&height=10.5\&width=2\&length=15\&province=CA\&postal_code=94041\&country=US\&signature_confirmation=false\&value=100\¤cy=CAD\&irregular=0\&insurance=true\&carrier=DHLeC\&is_return=false&packages[0][length]=10&packages[0][height]=5&packages[0][width]=15&packages[0][weight]=5&packages[1][length]=20&packages[1][height]=10&packages[1][width]=12&packages[1][weight]=4 responses: '200': description: OK content: application/json: schema: $ref: '#/definitions/Estimate' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /inbound: get: tags: - Inbound summary: GET /inbound description: Retrieves a list of inbound shipments. operationId: getInboundList consumes: - application/json produces: - application/json parameters: - in: query name: limit description: The number of results to return. required: false default: 50 minimum: 50 maximum: 100 type: string - in: query name: order description: The sort order of the results. required: false default: desc type: string enum: - asc - desc - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string security: - JWT: - read_products x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/inbound\?limit=50\&order=desc responses: '200': description: OK content: application/json: schema: type: object properties: inbound: type: array items: $ref: '#/definitions/InboundShipments' next_page: type: string description: Page token. Set by the system. example: null '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Inbound summary: POST /inbound description: Creates an inbound shipment. operationId: addInbound consumes: - application/json produces: - application/json security: - JWT: - write_products x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/inbound \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "inbound": { "carrier": "DHL", "notes": "Manufacturer: XYZ; Delivery: 12/2/24", "products": [ { "cost": 2.25, "id": , "quantity": 299 } ], "tracking_number": "", "warehouse": { "id": "WH0SZ001", "language": "Chinese", "language_code": "zh" } } }' requestBody: content: application/json: schema: type: object properties: inbound: $ref: '#/definitions/Inbound' required: - inbound responses: '201': description: Created content: application/json: schema: type: object properties: inbound: $ref: '#/definitions/Inbound' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'inbound/warehouse/id: Warehouse is not valid' status: error errors: - Warehouse is not valid product: summary: Product error description: Product not found or doesn't belong to user. value: code: 1352 message: Product '100312' can't be added status: error errors: [] duplicates: summary: Duplicate products description: Products must be unique when creating an inbound shipment. value: code: 1354 message: 'Duplicate products in the shipment: 100420' status: error errors: [] '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /inbound/{id}: get: tags: - Inbound summary: GET /inbound/{id} description: Retrieves an inbound shipment. operationId: getInboundById consumes: - application/json produces: - application/json security: - JWT: - read_products parameters: - in: query name: type description: The data stream type for downloading the inbound shipment label. required: false type: string enum: - PDF example: PDF - name: id in: path description: The inbound ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/inbound/{id} responses: '200': description: OK. Returns PDF blob if `type=PDF` parameter is used. content: application/json: schema: type: object properties: inbound: $ref: '#/definitions/Inbound' application/pdf: type: string '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Inbound shipment not found value: code: 1350 message: Inbound shipment not found errors: - Inbound shipment not found '429': $ref: '#/definitions/RateLimit' put: tags: - Inbound summary: PUT /inbound/{id} description: Updates an inbound shipment. operationId: updateInbound consumes: - application/json produces: - application/json security: - JWT: - write_products parameters: - name: id in: path description: The inbound ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/inbound/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "inbound": { "carrier": "DHL", "notes": "Manufacturer: XYZ; Delivery: 9/2/24", "tracking_number": "9261299991753900000290", "warehouse": { "id": "WH0SZ001", "language": "Chinese", "language_code": "zh" } } }' requestBody: content: application/json: schema: type: object properties: inbound: $ref: '#/definitions/InboundUpdate' required: - inbound responses: '200': description: OK content: application/json: schema: type: object properties: inbound: $ref: '#/definitions/Inbound' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'inbound/warehouse/id: Warehouse is not valid' status: error errors: - 'inbound/warehouse/id: Warehouse is not valid' inbound: summary: Can't be updated description: Inbound shipment can't be updated because the status doesn't allow it. value: code: 1353 message: Inbound shipment can't be updated status: error errors: - Inbound shipment can't be updated '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Inbound shipment not found value: code: 1350 message: Inbound shipment not found errors: - Inbound shipment not found '429': $ref: '#/definitions/RateLimit' delete: tags: - Inbound summary: DELETE /inbound/{id} description: Deletes an inbound shipment. operationId: deleteInbound consumes: - application/json produces: - application/json security: - JWT: - write_products parameters: - name: id in: path description: The inbound ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/inbound/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Inbound shipment not found value: code: 1350 message: Inbound shipment not found errors: - Inbound shipment not found '429': $ref: '#/definitions/RateLimit' /invoices: get: tags: - Invoices summary: GET /invoices description: Retrieves a paginated list of invoices. operationId: getInvoices consumes: - application/json produces: - application/json security: - JWT: - billing parameters: - in: query name: limit description: The number of results to return. required: false default: 50 minimum: 50 maximum: 100 type: string - in: query name: order description: The sort order of the results. required: false default: desc type: string enum: - asc - desc - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/invoices\?limit=50\&order=desc responses: '200': description: OK content: application/json: schema: type: object properties: invoices: type: array items: $ref: '#/definitions/Invoice' next_page: type: string description: Page token. Set by the system. example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /invoices/{id}: get: tags: - Invoices summary: GET /invoices/{id} description: Retrieves an invoice. Invoices before 2021-10-31 will not have a PDF. operationId: getInvoicesById consumes: - application/json produces: - application/json security: - JWT: - billing parameters: - name: Accept in: header required: false schema: type: string example: application/pdf enum: - application/json - application/pdf description: Optionally download the PDF. - in: query name: type description: Download the invoice and receipt documents. required: false deprecated: true type: string example: PDF enum: - PDF - name: id in: path description: The invoice ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/invoices/{id} responses: '200': description: Success OK. Returns PDF blob if `type=PDF` parameter is used. content: application/json: schema: type: object properties: invoice: $ref: '#/definitions/Invoice' application/pdf: type: string '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Invoice not found value: code: 1090 message: Invoice not found errors: - Invoice not found '429': $ref: '#/definitions/RateLimit' /labels/{id}: get: tags: - Labels summary: GET /labels/{id} description: Retrieves a label. operationId: getLabelsById consumes: - application/json produces: - application/json security: - JWT: - read_shipments parameters: - name: Accept in: header required: false schema: type: string example: application/pdf enum: - application/json - application/pdf description: Optionally download the label. - in: query name: type description: The data stream type if you don't want the label details and need the shipment label. required: false deprecated: true type: string enum: - PDF example: PDF - name: id in: path description: The label ID or tracking number required: true type: - integer - string maxLength: 40 x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/labels/{id} responses: '200': description: OK. Returns PDF blob if `type=PDF` parameter is used. content: application/json: schema: type: object properties: label: $ref: '#/definitions/Label' application/pdf: type: string '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Label not found value: code: 1205 message: Label not found errors: - Label not found '429': $ref: '#/definitions/RateLimit' patch: tags: - Labels summary: PATCH /labels/{id} description: Updates a label / package. operationId: patchLabel consumes: - application/json produces: - application/json security: - JWT: - write_shipments parameters: - name: id in: path description: The label ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PATCH https://api.boxc.com/v1/labels/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" -d '{ "label": { "cancelled": true, "overpack_id": null } }' requestBody: content: application/json: schema: type: object properties: label: $ref: '#/definitions/LabelPatch' required: - label responses: '200': description: OK content: application/json: schema: type: object properties: label: $ref: '#/definitions/Label' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: alreadyCancelled: summary: Bad Request description: Label was previously cancelled value: code: 1204 message: Label was previously cancelled errors: - Label was previously cancelled cannotCancel: summary: Bad Request description: Label can't be cancelled value: code: 1206 message: Label can't be cancelled errors: - Label can't be cancelled overpackLocked: summary: Overpack is locked description: Overpack is locked because it was previously manifested. value: code: 1251 message: Overpack is locked errors: - Overpack is locked '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Label not found value: code: 1205 message: Label not found errors: - Label not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: labelError: summary: Server Error Creating Label description: Label can't be cancelled value: code: 1206 message: Label can't be cancelled errors: - Label can't be cancelled /labels: post: tags: - Labels summary: POST /labels description: Creates a label using an existing shipment with no label or cancelled labels. operationId: addLabel consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/labels \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "label": { "shipment_id": } }' requestBody: content: application/json: schema: type: object properties: label: $ref: '#/definitions/Label' required: - label responses: '201': description: Created content: application/json: schema: type: object properties: label: $ref: '#/definitions/Label' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /label: The required properties (shipment_id) are missing' status: error errors: - '/label: The required properties (shipment_id) are missing' badRequest: summary: Bad Request description: Shipment has uncancelled or processed labels value: code: 1201 message: Shipment has uncancelled or processed labels errors: - Shipment has uncancelled or processed labels noRoutes: summary: Bad Routes Request description: No routes found value: code: 1050 message: No routes found errors: - No routes found '401': $ref: '#/definitions/Unauthorized' '402': $ref: '#/definitions/PaymentRequired' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shipment not found value: code: 1210 message: Shipment not found errors: - Shipment not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: labelError: summary: Server Error - Creating Label description: Label could not be created value: code: 1082 message: Label could not be created errors: - Label could not be created balanceError: summary: Server Error - Retrieving Balance description: There was an error while fetching the account balance value: code: 1081 message: There was an error while fetching the account balance errors: - There was an error while fetching the account balance chargingError: summary: Server Error - Charging Account description: There was an error while charging the account balance value: code: 1082 message: There was an error while charging the account balance errors: - There was an error while charging the account balance internalServerError: summary: Internal Server Error description: Server error. Try again later. value: code: 1001 message: Server error. Try again later. errors: - Server error. Try again later. /labels/bulk: post: tags: - Labels summary: POST /labels/bulk description: Create a PDF with up to 100 labels. operationId: bulkAddLabel consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/labels/bulk \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "labels": [ "", "", "" ] }' requestBody: required: true content: application/json: schema: $ref: '#/definitions/LabelPostBulkRequest' responses: '200': description: A single PDF file with up to 100 labels. content: applicatin/pdf '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: Label not available for PDF download. value: code: 1205 message: Label not found. status: error errors: - Label not found. '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /labels/{id}/cancel: put: tags: - Labels summary: PUT /labels/{id}/cancel description: Cancels a label. operationId: cancelLabel deprecated: true consumes: - application/json produces: - application/json security: - JWT: - write_shipments parameters: - name: id in: path description: The label ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/labels/{id}/cancel \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotCancel: summary: Bad Request description: Label can't be cancelled value: code: 1206 message: Label can't be cancelled errors: - Label can't be cancelled overpackLocked: summary: Overpack is locked description: Overpack is locked value: code: 1251 message: Overpack is locked errors: - Overpack is locked '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Label not found value: code: 1205 message: Label not found errors: - Label not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: labelError: summary: Server Error Creating Label description: Label can't be cancelled value: code: 1206 message: Label can't be cancelled errors: - Label can't be cancelled /manifests: get: tags: - Manifests summary: GET /manifests description: Retrieves a paginated list of manifests. operationId: getManifests consumes: - application/json produces: - application/json security: - JWT: - read_shipments parameters: - in: query name: entry_point description: Filter that returns manifests for a single entry point. required: false type: string - in: query name: limit description: The number of results to return. default: 50 minimum: 50 maximum: 100 required: false type: integer - in: query name: order description: The sort order of the results. default: desc required: false type: string enum: - asc - desc - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/manifests\?limit=50\&order=desc\&entry_point=HKGI01 responses: '200': description: OK content: application/json: schema: type: object properties: manifests: type: array items: $ref: '#/definitions/ManifestItem' next_page: type: string description: Page token. Set by the system. example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Manifests summary: POST /manifests description: Creates an manifest. operationId: addManifest consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/manifests \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "manifest": { "carrier": "USPS", "tracking_number": "", "overpacks": [ , ] } }' requestBody: content: application/json: schema: type: object properties: manifest: allOf: - $ref: '#/definitions/Manifest' - properties: overpacks: description: List of overpack IDs to include in the manifest. type: array minItems: 1 example: - 1000001 - 1000002 items: type: integer minimum: 1 required: - overpacks required: - manifest responses: '201': description: Created content: application/json: schema: type: object properties: manifest: allOf: - $ref: '#/definitions/Manifest' - properties: overpacks: description: A list of the overpacks and their details that are part of this manifest. Only available when creating and requesting a single manifest. type: array items: $ref: '#/definitions/Overpack' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /manifest/overpacks: Array should have at least 1 items, 0 found' status: error errors: - 'Validation Error. /manifest/overpacks: Array should have at least 1 items, 0 found' badRequest: summary: Bad Request - Overpack description: Overpack not found value: code: 1250 message: Overpack not found errors: - Overpack not found emptyOverpack: summary: Bad Request - Empty Overpack description: Overpack is empty value: code: 1270 message: Overpack is empty errors: - Overpack is empty entryPoint: summary: Bad Request - Entry Point description: All overpacks must have the same entry point value: code: 1271 message: All overpacks must have the same entry point errors: - All overpacks must have the same entry point overpackReuse: summary: Bad Request - Overpack re-use description: Overpack was already used in another manifest value: code: 1272 message: Overpack was already used in another manifest errors: - Overpack was already used in another manifest overpackIncomplete: summary: Bad Request - Overpack Incomplete description: Overpack is missing weight or dimensions value: code: 1273 message: Overpack is missing weight or dimensions errors: - Overpack is missing weight or dimensions '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Manifest could not be created. value: code: 1274 message: Manifest could not be created. errors: - Manifest could not be created. /manifests/{id}: get: tags: - Manifests summary: GET /manifests/{id} description: Retrieves a manifest. operationId: getManifestsById consumes: - application/json produces: - application/json security: - JWT: - read_shipments parameters: - name: Accept in: header required: false schema: type: string example: application/pdf enum: - application/json - application/pdf description: Optionally download the manifest documents. - in: query name: type description: | The data stream type if you don't want the manifest details, but need the paperwork or forms. Only **PDF** is accepted. required: false deprecated: true type: string example: PDF enum: - PDF - name: id in: path description: The manifest ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "accept: application/json" \ https://api.boxc.com/v1/manifests/{id} responses: '200': description: OK. Returns PDF blob if `type=PDF` parameter is used. The PDF combines all carrier documents. content: application/json: schema: type: object properties: manifest: allOf: - $ref: '#/definitions/Manifest' - properties: overpacks: description: A list of the overpacks and their details that are part of this manifest. Only available when creating and requesting a single manifest. type: array items: $ref: '#/definitions/Overpack' application/pdf: type: string '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Manifest not found value: code: 1275 message: Manifest not found errors: - Manifest not found '429': $ref: '#/definitions/RateLimit' /orders: get: tags: - Orders summary: GET /orders description: Retrieves a paginated list of orders. operationId: getOrders consumes: - application/json produces: - application/json security: - JWT: - read_orders parameters: - in: query name: created_min description: The inclusive date to begin the search in YYYY-MM-DD format. required: false default: null type: string - in: query name: created_max description: The inclusive date to end the search in YYYY-MM-DD format. required: false type: string default: null - in: query name: limit description: The number of results to return. required: false type: integer default: 50 minimum: 50 maximum: 100 - in: query name: order description: The sort order of the results. required: false type: string default: desc enum: - asc - desc - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string - in: query name: product.id description: Filter to return only orders containing the matching product. required: false type: integer - in: query name: shipping_address.name description: Filter to return only orders matching the shipping addressee's name. required: false type: string - in: query name: shop.id description: Filter to return only orders belonging to a particular shop you own. required: false type: string - in: query name: shop.order_id description: Filter to return only orders with a matching shop order ID. required: false type: string - in: query name: status description: Filter to return only orders with a particular status. Returns all by default. required: false type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/orders\?limit=50\&order=desc\&status=Processing\&shop.id=\&shop.order_id=\&shipping_address.name=\&product.id= responses: '200': description: OK content: application/json: schema: type: object properties: orders: type: array items: $ref: '#/definitions/Order' next_page: type: string description: Page token. Set by the system. example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request Page Token description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token invalidParameter: summary: Bad Request Query Parameter description: Query parameter is invalid value: code: 1031 message: Invalid query parameter errors: - Invalid query parameter '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Orders summary: POST /orders description: Creates an order. operationId: addOrder consumes: - application/json produces: - application/json security: - JWT: - write_orders x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/orders \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "order": { "consignee": { "name": "Addressee John", "phone": "555-444-7890", "email": null, "id": null, "street1": "2959 ANCHOR DR", "street2": null, "city": "MESQUITE", "province": "TX", "postal_code": 75150, "country": "US" }, "consignor": { "name": "Generic Company, LLC", "phone": "555-123-4567", "email": null, "id": null, "street1": "1 WORLD WAY", "street2": "", "city": "SHENZHEN", "province": "GUANGDONG", "postal_code": 518000, "country": "CN" }, "created": "2024-11-17 15:43:03", "exception_on_failure": false, "from": { "name": "My Company Name", "street1": "113 INTL BROADWAY", "street2": "", "city": "LOS ANGELES", "province": "CA", "postal_code": "91013", "country": "US" }, "gift_message": "Thanks for the laughs. -Sansa", "ignore_bad_address": false, "insurance": false, "line_items": [ { "quantity": 1, "sku": "", "sold_for": 9.95 } ], "packing_slip": true, "partial_fulfillment": false, "service": "BoxC Priority", "shop": { "id": "", "order_id": }, "signature_confirmation": false, "status": "Processing", "terms": "DDU", "to": { "company_name": null, "name": "John Smith", "phone": "555-123-4562", "email": "john@example.com", "street1": "108 N WESTGATE WAY", "street2": null, "city": "WYLIE", "province": "TX", "postal_code": "75098", "country": "US" }, "warehouse": { "id": "WH0SZ001" }, "wholesale": false } }' requestBody: required: true content: application/json: schema: properties: order: $ref: '#/definitions/Order' required: - order responses: '201': description: Created content: application/json: schema: type: object properties: order: $ref: '#/definitions/Order' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: Request is malformed. status: error errors: - Request is malformed. badRequest: summary: Bad Request Inactive Shop description: Shop is inactive value: code: 1374 message: Shop is inactive errors: - Shop is inactive missingShop: summary: Bad Shop Request description: Shop not found value: code: 1370 message: Shop not found errors: - Shop not found badOrderID: summary: Bad Request Order ID description: Duplicate shop.order_id value: code: 1326 message: Duplicate shop.order_id errors: - Duplicate shop.order_id giftMessage: summary: Bad Request Gift Message description: Packing slip is required for a gift message value: code: 1340 message: Packing slip is required for a gift message errors: - Packing slip is required for a gift message lineItems: summary: Bad Request Line Items description: Line items in the order must be unique value: code: 1325 message: Line items in the order must be unique errors: - Line items in the order must be unique addressError: summary: Bad Address Request description: Address Error value: code: 1012 message: Address Error errors: - Address Error missingSku: summary: Bad Request Missing SKU description: SKU does not exist in Shop value: code: 1330 message: SKU does not exist in Shop errors: - SKU does not exist in Shop inactiveSku: summary: Bad Request Inactive SKU description: SKU is inactive value: code: 1331 message: SKU is inactive errors: - SKU is inactive packaging: summary: Bad Request Packaging description: Packaging is not allowed in orders value: code: 1341 message: Packaging is not allowed in orders errors: - Packaging is not allowed in orders '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Order could not be created. value: code: 1323 message: Order could not be created. errors: - Order could not be created. '503': description: Service Unavailable content: application/json: schema: $ref: '#/definitions/ServiceUnavailable' examples: internalServerError: summary: Service Unavailable description: Address resolution service unavailable at this time. value: code: 503 message: Address resolution service unavailable at this time. errors: - Address resolution service unavailable at this time. /orders/{id}: get: tags: - Orders summary: GET /orders/{id} description: Retrieves an order. operationId: getOrdersById consumes: - application/json produces: - application/json security: - JWT: - read_orders parameters: - name: id in: path description: The order ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/orders/{id} responses: '200': description: OK content: application/json: schema: type: object properties: order: $ref: '#/definitions/Order' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Order not found value: code: 1320 message: Order not found errors: - Order not found '429': $ref: '#/definitions/RateLimit' put: tags: - Orders summary: PUT /orders/{id} description: Updates an order. operationId: updateOrder consumes: - application/json produces: - application/json security: - JWT: - write_orders parameters: - name: id in: path description: The order ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/orders/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "order": { "consignee": { "name": "Addressee John", "phone": "555-456-7890", "email": null, "id": null, "street1": "2959 ANCHOR DR", "street2": null, "city": "MESQUITE", "province": "TX", "postal_code": 75150, "country": "US" }, "consignor": { "name": "Generic Company, LLC", "phone": "555-123-4567", "email": null, "id": null, "street1": "1 WORLD WAY", "street2": "", "city": "SHENZHEN", "province": "GUANGDONG", "postal_code": 518000, "country": "CN" }, "from": { "name": "My Company Name", "street1": "113 INTL BROADWAY", "street2": "", "city": "LOS ANGELES", "province": "CA", "postal_code": "91013", "country": "US" }, "gift_message": "Thanks for the laughs. -Sansa", "ignore_bad_address": false, "insurance": false, "line_items": [ { "quantity": 1, "sku": "", "sold_for": 9.95 } ], "packing_slip": true, "partial_fulfillment": false, "service": "BoxC Priority", "shop": { "id": "", "name": "Appleseeds", "order_id": , "type": "BoxC" }, "signature_confirmation": false, "status": "Processing", "terms": "DDU", "to": { "company_name": null, "name": "John Smith", "phone": "555-123-4562", "email": "john@example.com", "street1": "108 N WESTGATE WAY", "street2": null, "city": "WYLIE", "province": "TX", "postal_code": "75098", "country": "US" }, "warehouse": { "id": "WH0SZ001" }, "wholesale": false } }' requestBody: content: application/json: schema: type: object properties: order: type: object properties: consignee: $ref: '#/definitions/Consignee' consignor: $ref: '#/definitions/Consignor' from: $ref: '#/definitions/From' gift_message: type: string description: An optional message to be included on the packing slip if requested. ``` packing_slip ``` must be true. maxLength: 128 example: Thanks for the laughs. -Sansa ignore_bad_address: type: boolean description: Ignore shipping address verification errors. Setting this to true automatically declines insurance coverage unless the shipping address was valid, in which case the system will change this back to false. BoxC Priority addresses can't be ignored. default: false example: false insurance: type: boolean description: Adds more insurance to shipments for a fee based on a percentage of the total value (including shipping cost) of the items in the fulfillment. By default shipments include insurance that covers up to $30 in total value even when insurance is false. Insurance is not available for the BoxC Post service and some accounts. default: false example: false line_items: description: An array of line items belonging to this order. Not all properties are present when searching. type: array items: $ref: '#/definitions/OrderLineItem' packing_slip: type: boolean description: Whether or not this order requires a packing slip for each fulfillment for an additional fee. default: false example: false partial_fulfillment: type: boolean description: Whether or not this order should be fulfilled partially. If true, the warehouse will fulfill line items as their products arrive in the event there is insufficient quantity. This property can't be changed for orders that have already been partially fulfilled. example: false service: type: string description: The type of shipping service you want to use for this shipment. Not all services exist to all countries. If the selected service does not exist, the service will automatically be downgraded to the next available level of service. enum: - BoxC Post - BoxC Parcel - BoxC Plus - BoxC Priority default: BoxC Parcel example: BoxC Priority shop: type: object description: Information about the shop this order is linked to. Required. This object is immutable. properties: id: type: string description: The shop ID. example: my-shop name: type: string description: A user defined shop name. maxLength: 32 example: Appleseeds order_id: type: string description: The shop order ID if available. Not required. You must provide this for the system to push tracking information to the third party shop. Must be unique for the shop. maxLength: 32 example: 30338272 type: type: string description: The shop type. Set by the system. example: BoxC required: - id signature_confirmation: type: boolean description: Request signature confirmation from the recipient upon delivery. Not available for all services or routes. An additional fee may apply. default: false example: false status: type: string description: The order's current status. You may place an order in Holding to prevent fulfillment or Processing to fulfill the order. enum: - Holding - Processing example: Processing terms: description: The [Incoterms](https://en.wikipedia.org/wiki/Incoterms) for this shipment that affects which routes are available. If terms is not provided then the system will pick DDU or DDP if DDU is not available. DDP shipments will include tax and duty. type: string enum: - DAP - DDU - DDP default: DDU example: DDU to: $ref: '#/definitions/To' warehouse: type: object description: Declare the warehouse where you want this order fulfilled. It will not be fulfilled until sufficient quantity exists at the specified warehouse. View the [Warehouses resource](/#tag/Warehouses) for a list. Optional. properties: id: type: string description: The unique warehouse ID. Default is null which is default system behavior. default: null example: WH0SZ001 required: - id wholesale: type: boolean description: Indicates this order is for wholesale. default: false example: true required: - to - consignor - service - line_items responses: '200': description: OK content: application/json: schema: type: object properties: order: $ref: '#/definitions/Order' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: Request is malformed. status: error errors: - Request is malformed. cannotModify: summary: Bad Modify Request description: Order can't be modified in its current state value: code: 1321 message: Order can't be modified in its current state errors: - Order can't be modified in its current state giftMessage: summary: Bad Request Gift Message description: Packing slip is required for a gift message value: code: 1340 message: Packing slip is required for a gift message errors: - Packing slip is required for a gift message lineItems: summary: Bad Request Line Items description: Line items in the order must be unique value: code: 1325 message: Line items in the order must be unique errors: - Line items in the order must be unique packaging: summary: Bad Request Packaging description: Packaging is not allowed in orders value: code: 1341 message: Packaging is not allowed in orders errors: - Packaging is not allowed in orders inactiveSku: summary: Bad Request Inactive SKU description: SKU is inactive value: code: 1331 message: SKU is inactive errors: - SKU is inactive missingSku: summary: Bad Request Missing SKU description: SKU does not exist in Shop value: code: 1330 message: SKU does not exist in Shop errors: - SKU does not exist in Shop address: summary: Bad Request Address Error description: Address Error value: code: 1012 message: Address Error errors: - Address Error '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Order not found value: code: 1320 message: Order not found errors: - Order not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Order could not be updated value: code: 1324 message: Order could not be updated errors: - Order could not be updated delete: tags: - Orders summary: DELETE /orders/{id} description: Deletes an order. operationId: deleteOrder consumes: - application/json produces: - application/json security: - JWT: - write_orders parameters: - name: id in: path description: The order ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/orders/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotModify: summary: Bad Modify Request description: Order can't be modified in its current state value: code: 1321 message: Order can't be modified in its current state errors: - Order can't be modified in its current state cannotDelete: summary: Bad Delete Request description: Order can't be deleted value: code: 1322 message: Order can't be deleted errors: - Order can't be deleted '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Order not found value: code: 1320 message: Order not found errors: - Order not found '429': $ref: '#/definitions/RateLimit' /orders/status: post: tags: - Orders summary: POST /orders/status description: Change the status of up to 100 orders at once. Returns the affected orders with their new status including those that can't be changed. It omits orders that can't be found. operationId: updateOrderStatus consumes: - application/json produces: - application/json security: - JWT: - write_orders x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/orders/status \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "orders": [ { "id": , "status": "Processing" } ] }' requestBody: content: application/json: schema: type: object properties: orders: type: array items: type: object minItems: 1 maxItems: 100 properties: id: type: integer description: The order ID. example: 1029210 status: type: string description: You may place an order in Holding to prevent fulfillment, or Processing to fulfill the order. enum: - Holding - Processing example: Processing required: - id - status required: - orders responses: '200': description: OK content: application/json: schema: type: object properties: orders: type: array items: $ref: '#/definitions/Order' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /orders: The required properties (status) are missing' status: error errors: - '/orders: The required properties (status) are missing' cannotModify: summary: Bad Modify Request description: Order can't be modified in its current state value: code: 1321 message: Order can't be modified in its current state errors: - Order can't be modified in its current state notFound: summary: Not Found description: Order not found value: code: 1320 message: Order not found errors: - Order not found '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /overpacks: get: tags: - Overpacks summary: GET /overpacks description: Retrieves a paginated list of overpacks. operationId: getOverpacks consumes: - application/json produces: - application/json security: - JWT: - read_shipments parameters: - in: query name: limit description: The number of results to return. required: false type: string default: 50 minimum: 50 maximum: 100 - in: query name: order description: The sort order of the results. enum: - asc - desc required: false default: desc type: string - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/overpacks\?limit=100\&order=desc responses: '200': description: OK content: application/json: schema: type: object properties: overpacks: type: array items: $ref: '#/definitions/OverpackList' next_page: type: string description: Page token. Set by the system. example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Overpacks summary: POST /overpacks description: Creates an overpack. operationId: addOverpack consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/overpacks \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "overpack": { "height": 50, "length": 91, "shipments": [ { "id": , "label_id": , "tracking_number": "" } ], "weight": 87.5, "width": 30 } }' requestBody: content: application/json: schema: type: object properties: overpack: $ref: '#/definitions/Overpack' required: - overpack responses: '201': description: Created content: application/json: schema: properties: overpack: $ref: '#/definitions/Overpack' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: '"Validation Error. /overpack/type86:The data (string) must match the type: boolean' status: error errors: - '/overpack/type86:The data (string) must match the type: boolean' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Overpack could not be created. value: code: 1252 message: Overpack could not be created. errors: - Overpack could not be created. /overpacks/{id}: get: tags: - Overpacks summary: GET /overpacks/{id} description: Retrieves an overpack. operationId: getOverpacksById consumes: - application/json produces: - application/json security: - JWT: - read_shipments parameters: - name: Accept in: header required: false schema: type: string example: application/pdf enum: - application/json - application/pdf description: Optionally download the overpack label. - in: query name: type description: The data stream type if you don't want the overpack details and need the label for the overpack. required: false deprecated: true type: string enum: - PDF example: PDF - name: id in: path description: The overpack ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/overpacks/{id} responses: '200': description: OK. Returns PDF blob if `type=PDF` parameter is used. content: application/json: schema: properties: overpack: $ref: '#/definitions/Overpack' application/pdf: type: string '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Overpack not found value: code: 1250 message: Overpack not found errors: - Overpack not found '429': $ref: '#/definitions/RateLimit' put: tags: - Overpacks summary: PUT /overpacks/{id} description: Updates an overpack. operationId: updateOverpack consumes: - application/json produces: - application/json security: - JWT: - write_shipments parameters: - name: id in: path description: The overpack ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/overpacks/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "height": 50, "length": 91, "shipments": [ { "id": , "label_id": , "tracking_number": "" } ], "weight": 87.5, "width": 30 }' requestBody: content: application/json: schema: $ref: '#/definitions/Overpack' responses: '200': description: OK. When assigning shipments to an overpack a `overpack.shipments[].error` field will be available when it can't be added but a succcessful response is still returned. content: application/json: schema: properties: overpack: $ref: '#/definitions/Overpack' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: '"Validation Error. /overpack/type86:The data (string) must match the type: boolean' status: error errors: - '/overpack/type86:The data (string) must match the type: boolean' cannotModify: summary: Bad Modify Request description: Overpack is locked value: code: 1251 message: Overpack is locked errors: - Overpack is locked '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Overpack not found value: code: 1250 message: Overpack not found errors: - Overpack not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Overpack can't be updated value: code: 1254 message: Overpack can't be updated errors: - Overpack can't be updated delete: tags: - Overpacks summary: DELETE /overpacks/{id} description: Deletes an overpack. operationId: deleteOverpack consumes: - application/json produces: - application/json security: - JWT: - write_shipments parameters: - name: id in: path description: The overpack ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/overpacks/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotDelete: summary: Bad Request description: Overpack is locked value: code: 1251 message: Overpack is locked errors: - Overpack is locked '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Overpack not found value: code: 1250 message: Overpack not found errors: - Overpack not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Overpack can't be deleted value: code: 1253 message: Overpack can't be deleted errors: - Overpack can't be deleted /products: get: tags: - Products summary: GET /products description: Retrieves a paginated list of products. operationId: getProducts consumes: - application/json produces: - application/json parameters: - in: query name: limit description: The number of results to return. required: false type: integer default: 50 minimum: 50 maximum: 100 - in: query name: order description: The sort order of the results. required: false default: desc enum: - asc - desc type: string - in: query name: name description: Filter that searches for products with a similar name. required: false default: null type: string - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string - in: query name: shop.id description: Filter that selects products for a shop with the matching Shop ID. Products for all shops are returned by default. required: false type: string default: null maxLength: 32 - in: query name: sku description: Filter that searches for products with a matching SKU. required: false default: null type: string - in: query name: sort description: The property to sort the results by. required: false enum: - id - name - backordered - quantity default: id type: string security: - JWT: - read_products x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/products\?limit=50\&order=desc\&sort=id responses: '200': description: OK content: application/json: schema: type: object properties: products: type: array items: $ref: '#/definitions/Product' next_page: type: string description: Page token example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Products summary: POST /products description: Creates a product. operationId: addProduct consumes: - application/json produces: - application/json security: - JWT: - write_products x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/products \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "product": { "barcode": "4011200296908", "coo": "CN", "cost": 2.25, "description": "100% Cotton Shirt", "dg_code": "0966", "hs_codes": [ { "country": "US", "hs_code": "3109165102" }, { "country": "CN", "hs_code": "0302410090" } ], "local_descriptions": [ { "description": "100% Cotton T-Shirt", "language_code": "en" }, { "description": "毛衣", "language_code": "zh" } ], "name": "XL Pink T-Shirt", "supplier": "US123456789", "url": "https://example.com/product/1234", "value": 19.99 } }' requestBody: required: true content: application/json: schema: type: object properties: product: $ref: '#/definitions/Product' responses: '201': description: Created content: application/json: schema: type: object properties: product: $ref: '#/definitions/ProductWarehouse' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /product: The required properties (coo) are missing' status: error errors: - '/product: The required properties (coo) are missing' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /products/{id}: get: tags: - Products summary: GET /products/{id} description: Retrieves a product. operationId: getProductsById consumes: - application/json produces: - application/json security: - JWT: - read_products parameters: - name: Accept in: header required: false schema: type: string example: application/pdf enum: - application/json - application/pdf description: Optionally download the product barcode. - in: query name: type type: string description: The data stream type for downloading the product barcode. required: false deprecated: true enum: - PDF example: PDF - in: query name: height description: The height of the barcode in inches. type: decimal default: 1 minimum: 0.5 maximum: 4 required: false - in: query name: width description: The width of the barcode in inches. type: decimal default: 2 minimum: 0.5 maximum: 4 - name: id in: path description: The product ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "accept: application/json" \ https://api.boxc.com/v1/products/{id} responses: '200': description: OK content: application/json: schema: type: object properties: product: $ref: '#/definitions/ProductWarehouse' application/pdf: type: string '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Product not found value: code: 1332 message: Product not found errors: - Product not found '429': $ref: '#/definitions/RateLimit' put: tags: - Products summary: PUT /products/{id} description: Updates a product. operationId: updateProduct consumes: - application/json produces: - application/json security: - JWT: - write_products parameters: - name: id in: path description: The product ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/products/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "product": { "barcode": "4011200296908", "coo": "CN", "cost": 2.25, "description": "100% Cotton Shirt", "dg_code": "0966", "hs_codes": [ { "country": "US", "hs_code": "3109165102" }, { "country": "CN", "hs_code": "0302410090" } ], "local_descriptions": [ { "description": "100% Cotton T-Shirt", "language_code": "en" }, { "description": "毛衣", "language_code": "zh" } ], "name": "XL Pink T-Shirt", "supplier": "US123456789", "url": "https://example.com/product/1234", "value": 19.99 } }' requestBody: content: application/json: schema: type: object properties: product: $ref: '#/definitions/Product' responses: '200': description: OK content: application/json: schema: type: object properties: product: $ref: '#/definitions/ProductWarehouse' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /product: The required properties (coo) are missing' status: error errors: - '/product: The required properties (coo) are missing' barcode: summary: Bad Request description: Contact support to update barcode for Product value: code: 1338 message: Contact support to update barcode for Product errors: - Contact support to update barcode for Product '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Product not found value: code: 1332 message: Product not found errors: - Product not found '429': $ref: '#/definitions/RateLimit' delete: tags: - Products summary: DELETE /products/{id} description: Deletes a product. operationId: deleteProduct consumes: - application/json produces: - application/json security: - JWT: - write_products parameters: - name: id in: path description: The product ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/products/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotDelete: summary: Bad Request description: Product can't be deleted because it's being used value: code: 1333 message: Product can't be deleted because it's being used errors: - Product can't be deleted because it's being used '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Product not found value: code: 1332 message: Product not found errors: - Product not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Product can't be deleted value: code: 1333 message: Product can't be deleted errors: - Product can't be deleted /products/{id}/skus: post: tags: - Products summary: POST /products/{id}/skus description: Adds a SKU to a product. operationId: addProductSku consumes: - application/json produces: - application/json security: - JWT: - write_products parameters: - name: id in: path description: The product ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/products/{id}/skus \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "sku": { "active": true, "shop_id": "", "sku": "" } }' requestBody: required: true content: application/json: schema: type: object properties: sku: $ref: '#/definitions/Sku' required: - sku responses: '201': description: Created content: application/json: schema: type: object properties: product: $ref: '#/definitions/ProductWarehouse' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /sku: The required properties (shop_id) are missing' status: error errors: - '/sku: The required properties (shop_id) are missing' missingShop: summary: Bad Shop Request description: Shop not found value: code: 1370 message: Shop not found errors: - Shop not found skuInUse: summary: Bad SKU Request description: SKU for Shop is already in use value: code: 1334 message: SKU for Shop is already in use errors: - SKU for Shop is already in use productSku: summary: Bad Product/SKU Request description: Only one SKU can be active for Product in Shop value: code: 1337 message: Only one SKU can be active for Product in Shop errors: - Only one SKU can be active for Product in Shop '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Product not found value: code: 1332 message: Product not found errors: - Product not found '429': $ref: '#/definitions/RateLimit' /products/{id}/shop/{shopId}/sku/{sku}: put: tags: - Products summary: PUT /products/{id}/shop/{shopId}/sku/{sku} description: Updates an existing SKU for a given product and shop. operationId: updateProductSku consumes: - application/json produces: - application/json security: - JWT: - write_products parameters: - name: id in: path description: The product ID required: true type: integer - name: shopId in: path description: The shop ID required: true type: string maxLength: 32 - name: sku in: path description: The product SKU required: true type: string x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/products/{id}/shop/{shopId}/sku/{sku} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "sku": { "active": false, "sku": "" } }' requestBody: required: true content: application/json: schema: type: object properties: sku: type: object properties: active: description: Whether or not this SKU is active. Orders with an inactive SKU will not be imported or created. type: boolean default: true example: true sku: description: The SKU identifier type: string minLength: 3 maxLength: 32 example: SK10291 responses: '200': description: OK content: application/json: schema: type: object properties: product: $ref: '#/definitions/ProductWarehouse' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /sku: The required properties (active) are missing' status: error errors: - '/sku: The required properties (active) are missing' missingShop: summary: Bad Shop Request description: Shop not found value: code: 1370 message: Shop not found errors: - Shop not found skuInUse: summary: Bad SKU Request description: SKU for Shop is already in use value: code: 1334 message: SKU for Shop is already in use errors: - SKU for Shop is already in use productSku: summary: Bad Product/SKU Request description: Only one SKU can be active for Product in Shop value: code: 1337 message: Only one SKU can be active for Product in Shop errors: - Only one SKU can be active for Product in Shop '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Product not found value: code: 1332 message: Product not found errors: - Product not found skuNotFound: summary: SKU Not Found description: SKU does not exist in Shop value: code: 1330 message: SKU does not exist in Shop errors: - SKU does not exist in Shop '429': $ref: '#/definitions/RateLimit' delete: tags: - Products summary: DELETE /products/{id}/shop/{shopId}/sku/{sku} description: Deletes a SKU if it's not being used by orders. operationId: deleteProductSku consumes: - application/json produces: - application/json security: - JWT: - write_products parameters: - name: id in: path description: The product ID required: true type: integer - name: shopId in: path description: The shop ID required: true type: string maxLength: 32 - name: sku in: path description: The product SKU required: true type: string x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/products/{id}/shop/{shopId}/sku/{sku} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotDelete: summary: Bad Request description: SKU can't be deleted value: code: 1335 message: SKU can't be deleted errors: - SKU can't be deleted '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: skuNotFound: summary: SKU Not Found description: SKU does not exist in Shop value: code: 1330 message: SKU does not exist in Shop errors: - SKU does not exist in Shop notFound: summary: Product Not Found description: Product not found value: code: 1332 message: Product not found errors: - Product not found '429': $ref: '#/definitions/RateLimit' /reshipments: get: tags: - Reshipments summary: GET /reshipments description: Retrieves a paginated list of reshipments. operationId: getReshipments consumes: - application/json produces: - application/json security: - JWT: - returns parameters: - in: query name: limit description: The number of results to return. default: 50 minimum: 50 maximum: 100 required: false type: integer - in: query name: order description: The sort order of the results. enum: - asc - desc default: desc required: false type: string - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/reshipments\?limit=50\&order=desc responses: '200': description: OK content: application/json: schema: type: object properties: reshipments: type: array items: type: object properties: contents: description: A description of the contents in this reshipment for Customs requirements. type: string format: string maxLength: 60 default: null example: Leggings created: description: The UTC date and time the reshipment was created. Set by the system. type: string example: '2024-06-27 11:32:18' estimated_reship_fee: description: An estimated price in USD for this reshipment including the cost of the label and packaging material. Set by the system. type: decimal default: 0 example: 14.2 id: description: The unique ID for this reshipment. Set by the system. type: integer example: 13489 reship_fee: description: The fee in USD for this reshipment including the cost of the label and packaging material. Set by the system. type: decimal default: 0 example: 14.37 returns: type: integer description: The total number of returns included in this reshipment. This property is immutable. example: 3 service: description: The carrier used for this reshipment. Set by the system. type: string default: null example: USPS status: type: string description: | The status of this reshipment. Can be one of: - Pending - Declined - Approved example: Approved to: $ref: '#/definitions/To' tracking_number: type: string description: The tracking number for this reshipment. Set by the system. default: null example: '9261299997140101431920' value: type: decimal description: The total value of the contents in this reshipment for Customs requirements. example: 29.95 weight: description: The measured actual weight of this reshipment in KG. Set by the system. type: decimal default: 0 example: 0.791 next_page: type: string description: Page token example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Reshipments summary: POST /reshipments description: Creates a reshipment. operationId: addReshipment consumes: - application/json produces: - application/json security: - JWT: - returns x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/reshipments \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "reshipment": { "contents": "Leggings", "returns": [ 12001, 12002 ], "to": { "company_name": null, "name": "John Smith", "phone": "555-123-4562", "email": "john@example.com", "street1": "108 N WESTGATE WAY", "street2": null, "city": "WYLIE", "province": "TX", "postal_code": "75098", "country": "US" }, "value": 29.95 } }' requestBody: required: true content: application/json: schema: type: object properties: reshipment: type: object properties: contents: description: A description of the contents in this reshipment for Customs requirements. type: string format: string maxLength: 60 default: null example: Leggings returns: type: array description: A list of return IDs included in this reshipment. If searching for reshipments then the total number of returns will be shown instead. This property is immutable. items: type: integer example: - 12001 - 12002 to: $ref: '#/definitions/To' value: type: decimal description: The total value of the contents in this reshipment for Customs requirements. example: 29.95 required: - contents - value - to - returns responses: '201': description: Created content: application/json: schema: type: object properties: reshipment: $ref: '#/definitions/Reshipment' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /reshipment: The required properties (contents) are missing' status: error errors: - '/reshipment: The required properties (contents) are missing' badRequest: summary: Bad Request description: Return can't be reshipped value: code: 1144 message: Return can't be reshipped status: error errors: - Return can't be reshipped badReturnRequest: summary: Return can't be reshipped description: One or more returns can't be reshipped value: code: 1143 message: One or more returns can't be reshipped status: error errors: - One or more returns can't be reshipped '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Server error. Try again later. value: code: 1001 message: Server error. Try again later. errors: - Server error. Try again later. /reshipments/{id}: get: tags: - Reshipments summary: GET /reshipments/{id} description: Retrieves a reshipment. operationId: getReshipmentsById consumes: - application/json produces: - application/json security: - JWT: - returns parameters: - name: id in: path description: The reshipment ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/reshipments/{id} responses: '200': description: OK content: application/json: schema: type: object properties: reshipment: $ref: '#/definitions/Reshipment' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Reshipment not found value: code: 1140 message: Reshipment not found errors: - Reshipment not found '429': $ref: '#/definitions/RateLimit' put: tags: - Reshipments summary: PUT /reshipments/{id} description: Updates a reshipment. operationId: updateReshipment consumes: - application/json produces: - application/json security: - JWT: - returns parameters: - name: id in: path description: The reshipment ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/reshipments/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "reshipment": { "status": "Approved" } }' requestBody: content: application/json: schema: type: object properties: reshipment: type: object properties: status: type: string enum: - Declined - Approved description: The status of this reshipment. example: Approved required: - status responses: '200': description: OK content: application/json: schema: type: object properties: reshipment: $ref: '#/definitions/Reshipment' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /reshipment: The required properties (status) are missing' status: error errors: - '/reshipment: The required properties (status) are missing' barcode: summary: Bad Request description: Reshipment can't be updated value: code: 1141 message: Reshipment can't be updated errors: - Reshipment can't be updated '401': $ref: '#/definitions/Unauthorized' '402': $ref: '#/definitions/PaymentRequired' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Reshipment not found value: code: 1140 message: Reshipment not found errors: - Reshipment not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: There was an error while fetching the account balance value: code: 1081 message: There was an error while fetching the account balance errors: - There was an error while fetching the account balance delete: tags: - Reshipments summary: DELETE /reshipments/{id} description: Deletes a reshipment. operationId: deleteReshipment consumes: - application/json produces: - application/json security: - JWT: - returns parameters: - name: id in: path description: The reshipment ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/reshipments/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotDelete: summary: Bad Request description: Reshipment can't be deleted value: code: 1142 message: Reshipment can't be deleted errors: - Reshipment can't be deleted '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Reshipment not found value: code: 1140 message: Reshipment not found errors: - Reshipment not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Reshipment can't be deleted value: code: 1142 message: Reshipment can't be deleted errors: - Reshipment can't be deleted /returns: get: tags: - Returns summary: GET /returns description: Retrieves a paginated list of returns. operationId: getReturns consumes: - application/json produces: - application/json security: - JWT: - returns parameters: - in: query name: limit description: The number of results to return. default: 50 minimum: 50 maximum: 100 required: false type: integer - in: query name: order description: The sort order of the results enum: - asc - desc default: desc required: false type: string - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string - in: query name: tracking_number description: Filter that selects returns with the given tracking_number. Default behavior is to return all returns. required: false default: null type: string - in: query name: status description: Filter that selects returns with the given status. Default behavior is to return all returns. required: false default: null type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/returns\?limit=50\&order=desc\&status=Processed responses: '200': description: OK content: application/json: schema: type: object properties: returns: type: array items: type: object properties: created: description: The UTC date and time the return was processed at a facility. type: string example: '2024-06-27 11:32:18' readOnly: true id: description: The unique ID for this return. type: integer example: 13489 readOnly: true messages: type: integer description: The number of messages. example: 2 readOnly: true process_fee: description: The fee in USD for processing this return. type: decimal example: 1 readOnly: true reshipment_id: description: The unique ID for this return's reshipment if available. type: integer default: null example: 102910 readOnly: true rma_number: type: string description: The return merchandise authorization (RMA) for this return if available. default: null example: RMA10293021 status: type: string enum: - Processed - Verifying - Verified - Reshipping - Reshipped description: | The status of the return. example: Processed readOnly: true tracking_number: type: string description: The tracking number that was used by the sender for this return. example: '9261299997140101431920' readOnly: true verify_fee: description: The fee in USD for verifying this return. Only applies to returns that were verified. type: decimal default: 0 example: 0 readOnly: true warehouse: description: Information about the warehouse the return was processed at. type: object properties: id: description: The warehouse id type: string example: WH0CVG01 readOnly: true weight: description: The measured weight of this return in KG. type: decimal default: 0 example: 0.128 readOnly: true next_page: type: string description: Page token. Set by the system. example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw readOnly: true '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /returns/{id}: get: tags: - Returns summary: GET /returns/{id} description: Retrieves a return. operationId: getReturnsById consumes: - application/json produces: - application/json security: - JWT: - returns parameters: - name: id in: path description: The return ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/returns/{id} responses: '200': description: OK content: application/json: schema: type: object properties: return: $ref: '#/definitions/Return' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Return not found value: code: 1120 message: Return not found errors: - Return not found '429': $ref: '#/definitions/RateLimit' put: tags: - Returns summary: PUT /returns/{id} description: Request verification of a return. operationId: updateReturn consumes: - application/json produces: - application/json security: - JWT: - returns x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/returns/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "return": { "status": "Verify" } }' requestBody: content: application/json: schema: type: object properties: return: type: object properties: status: type: string description: Change the status to Verify. example: Verify enum: - Verify responses: '200': description: OK content: application/json: schema: type: object properties: return: $ref: '#/definitions/Return' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /return: The required properties (status) are missing' status: error errors: - '/return: The required properties (status) are missing' badRequest: summary: Bad Request description: Return must be processed before verifying value: code: 1121 message: Return must be processed before verifying errors: - Return must be processed before verifying '401': $ref: '#/definitions/Unauthorized' '402': $ref: '#/definitions/PaymentRequired' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Return not found value: code: 1120 message: Return not found errors: - Return not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: There was an error while fetching the account balance value: code: 1081 message: There was an error while fetching the account balance errors: - There was an error while fetching the account balance chargingError: summary: Internal Server Error - Charging Account description: There was an error while charging the account balance value: code: 1082 message: There was an error while charging the account balance errors: - There was an error while charging the account balance delete: tags: - Returns summary: DELETE /returns/{id} description: Deletes a return. operationId: deleteReturn consumes: - application/json produces: - application/json security: - JWT: - returns parameters: - name: id in: path description: The return ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/returns/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotDelete: summary: Bad Request description: Return can't be discarded with this status value: code: 1122 message: Return can't be discarded errors: - Return can't be discarded '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Return not found value: code: 1120 message: Return not found errors: - Return not found '429': $ref: '#/definitions/RateLimit' /returns/{id}/messages: post: tags: - Returns summary: POST /returns/{id}/messages description: Adds a message to a return. operationId: addReturn consumes: - application/json produces: - application/json security: - JWT: - returns x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/returns/{id}/messages \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "message": { "body": "Forward to John Doe, Order ID #123458-10" } }' requestBody: required: true content: application/json: schema: type: object properties: message: type: object properties: body: type: string description: The content body of the message. example: 'Forward to John Doe, Order ID #123458-10' maxLength: 200 responses: '201': description: Created. content: application/json: schema: type: object properties: return: $ref: '#/definitions/Return' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /return: The required properties (body) are missing' status: error errors: - '/return: The required properties (body) are missing' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Return not found value: code: 1120 message: Return not found errors: - Return not found '429': $ref: '#/definitions/RateLimit' /shipments: get: tags: - Shipments summary: GET /shipments description: Retrieves a paginated list of shipments. operationId: getShipments consumes: - application/json produces: - application/json security: - JWT: - read_shipments parameters: - in: query name: created_min description: The inclusive date to begin the search. format: YYYY-MM-DD required: false type: string default: null - in: query name: created_max description: The inclusive date to end the search. format: YYYY-MM-DD required: false type: string default: null - in: query name: labeled description: Filter to return only shipments that have labels. enum: - 'yes' - 'no' - both required: false type: string default: both - in: query name: limit description: The number of results to return. required: false type: integer default: 50 minimum: 50 maximum: 100 - in: query name: order description: The sort order of the results. enum: - asc - desc required: false type: string default: desc - in: query name: order_number description: Filter that searches for shipments by the order_number. required: false type: string default: null - in: query name: overpack_id description: Filter that searches for shipments by their overpack ID. required: false type: integer default: null - in: query name: packed description: Filter to return only shipments that are in an overpack. enum: - 'yes' - 'no' - both required: false type: string default: both - in: query name: page_token description: Used for selecting the page after the initial query. required: false default: null type: string - in: query name: processed description: Filter to return only shipments that are processed. enum: - 'yes' - 'no' - both required: false type: string default: both - in: query name: tracking_number maxLength: 40 description: Filter that searches for shipments by tracking number. Date filters are ignored if this is provided. required: false type: string default: null x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/shipments\?limit=50\&order=desc\&labeled=both\&packed=both\&processed=both\&comments=1+phone+case\&tracking_number= responses: '200': description: OK content: application/json: schema: type: object properties: shipments: type: array items: $ref: '#/definitions/Shipment' next_page: type: string description: Page token example: ZGF0ZV9lbmQ9MjAyMy0wNy0yOCZsaW1pdD01MCZvcmRlcj1kZXNjJnBhZ2U9MSZsYXN0X2lkPTE1Mzg0Nw '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request Page Token description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token invalidParameter: summary: Bad Request Query Parameter description: Query parameter is invalid value: code: 1031 message: Invalid query parameter errors: - Invalid query parameter '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Shipments summary: POST /shipments description: Creates a shipment. operationId: addShipment consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-codeSamples: - lang: cURL label: cURL Example 1 source: | curl -X POST https://api.boxc.com/v1/shipments \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "shipment": { "carrier": null, "carrier_params": null, "comments": [ "Test comment" ], "cod": { "amount": 0 }, "consignee": { "name": "Addressee John", "phone": "555-987-7890", "email": null, "id": null, "street1": "2959 ANCHOR DR", "street2": null, "city": "MESQUITE", "province": "TX", "postal_code": "75150", "country": "US" }, "consignor": { "name": "My Company Name", "street1": "113 INTL BROADWAY", "street2": "", "city": "LOS ANGELES", "province": "CA", "postal_code": "91013", "country": "US" }, "create_label": false, "currency": "USD", "entry_point": "TEST01", "exit_point": "ORD", "freight_charge": { "amount": 12.26, "currency": "USD" }, "from": null, "height": 3.9, "ignore_bad_address": false, "insurance": false, "irregular": false, "is_return": false, "length": 10, "line_items": [ { "coo": "CN", "currency": "USD", "description": "Phone case", "dg_code": null, "hts_code": null, "origin_description": "手机外壳", "product_id": null, "quantity": 1, "url": null, "supplier": "US23123131", "value": 9.95, "weight": 0.276 } ], "nature_type": null, "service": "BoxC Parcel", "signature_confirmation": false, "terms": "DDU", "test": true, "to": { "company_name": null, "name": "John Smith", "phone": "555-123-456", "email": "john@example.com", "street1": "108 N WESTGATE WAY", "street2": null, "city": "Wylie", "province": "TX", "postal_code": "75098", "country": "US" }, "weight": 0.4, "width": 5 } }' - lang: cURL label: cURL Example 2 source: | curl -X POST https://api.boxc.com/v1/shipments \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "shipment": { "carrier": "PostPlus", "comments": [ "SKU #10292301" ], "consignee": { "name": "Addressee John", "phone": "555-987-6543", "email": null, "id": null, "street1": "123 Main Ave.", "street2": null, "city": "Amsterdam", "province": null, "postal_code": "1234 AB", "country": "NL" }, "consignor": { "name": "Generic Company, LLC", "phone": "555-123-4567", "email": null, "id": null, "street1": "1 WORLD WAY", "street2": "", "city": "Indianapolis", "province": "IN", "postal_code": 60601, "country": "US" }, "create_label": false, "currency": "USD", "entry_point": "TEST01", "exit_point": "AMS", "from": null, "height": 16.00, "ignore_bad_address": false, "insurance": false, "irregular": false, "is_return": false, "length": 13, "line_items": [ { "coo": "CN", "currency": "USD", "description": "Phone case", "dg_code": null, "hts_code": null, "origin_description": "手机外壳", "product_id": null, "quantity": 1, "supplier": "US23123131", "url": null, "value": 19.95, "weight": 0.276 } ], "nature_type": null, "order_number": "23018721-ABC", "overpack_id": 1291028, "service": "BoxC Parcel", "signature_confirmation": false, "terms": "DDP", "test": true, "to": { "company_name": null, "name": "John Smith", "phone": "555-888-4444", "email": "john@example.com", "street1": "108 N WESTGATE WAY", "street2": null, "city": "Amsterdam", "province": null, "postal_code": "1234 AB", "country": "NL" }, "weight": 0.276, "width": 10, "zonos_customer_id": "" } }' requestBody: required: true content: application/json: schema: type: object properties: shipment: $ref: '#/definitions/Shipment' required: - shipment responses: '201': description: Created content: application/json: schema: type: object properties: shipment: $ref: '#/definitions/Shipment' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: Request is malformed. status: error errors: - Request is malformed. notFound: summary: Not Found description: Credential not found value: code: 1450 message: Credential not found errors: - Credential not found languageError: summary: Entry Point Language description: Origin description must be in the entry point's language value: code: 1222 message: Origin description must be in the entry point's language errors: - Origin description must be in the entry point's language descriptionError: summary: Description Unacceptable description: Description isn't acceptable value: code: 1223 message: Description isn't acceptable errors: - Description isn't acceptable htsCode: summary: HTS Code Error description: Line item HTS code error with a reason value: code: 1224 message: 'HTS Code error: code is too long after validation (''0102294064220'')' errors: - 'HTS Code error: code is too long after validation (''0102294064220'')' noRoutes: summary: Bad Routes Request description: No routes found value: code: 1050 message: No routes found errors: - No routes found addressError: summary: Bad Address Request description: Address Error value: code: 1012 message: Address Error errors: - Address Error hsCodeMissing: summary: Missing Requirements description: An HS Code and description are required for all products. value: code: 1215 message: Shipment requires an HS Code and description for all line items errors: - Shipment requires an HS Code and description for all line items dutyRates: summary: Duty Rates description: Unable to get tax and/or duty rates for this shipment value: code: 1243 message: Unable to get tax and/or duty rates for this shipment errors: - Unable to get tax and/or duty rates for this shipment '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Error while checking for denied parties value: code: 1010 message: Error while checking for denied parties errors: - Error while checking for denied parties labelError: summary: Server Error Creating Label description: Label could not be created. value: code: 1203 message: Label could not be created. errors: - Label could not be created. '503': description: Service Unavailable content: application/json: schema: $ref: '#/definitions/ServiceUnavailable' examples: internalServerError: summary: Service Unavailable description: Address resolution service unavailable at this time. value: code: 503 message: Address resolution service unavailable at this time. errors: - Address resolution service unavailable at this time. /shipments/{id}: get: tags: - Shipments summary: GET /shipments/{id} description: Gets a shipment by its `id`. Clients can print a generic BoxC shipment label by changing the `Accept` header to application/pdf or providing `type=PDF` in the query parameters. The label is not a carrier label and should only be used for internal operations. operationId: getShipmentsById consumes: - application/json produces: - application/json - application/pdf security: - JWT: - read_shipments parameters: - name: Accept in: header required: false schema: type: string example: application/pdf enum: - application/json - application/pdf description: Optionally download the generic shipment label. - in: query name: type description: Allows a client to print the BoxC generic shipment label. required: false deprecated: true type: string example: PDF enum: - PDF - name: id in: path description: The shipment ID required: true type: integer x-codeSamples: - lang: cURL label: cURL JSON source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/shipments/{id} - lang: cURL label: cURL PDF source: | curl -H "Authorization: Bearer " \ -H "Accept: application/pdf" \ https://api.boxc.com/v1/shipments/{id} responses: '200': description: Returns application/json or a PDF depending on the Accept request header. content: application/json: schema: type: object properties: shipment: $ref: '#/definitions/Shipment' application/pdf: type: string '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shipment not found value: code: 1210 message: Shipment not found errors: - Shipment not found '429': $ref: '#/definitions/RateLimit' put: tags: - Shipments summary: PUT /shipments/{id} description: Updates a shipment. Only shipments with no labels or cancelled labels can be updated. operationId: updateShipment consumes: - application/json produces: - application/json security: - JWT: - write_shipments parameters: - name: id in: path description: The shipment ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/shipments/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "shipment": { "carrier": "PostPlus", "carrier_params": null, "comments": [ "SKU #10292301" ], "cod: { "amount": 0 }, "consignee": { "name": "Addressee John", "phone": "555-987-6543", "email": null, "id": null, "street1": "2959 ANCHOR DR", "street2": null, "city": "Amsterdam", "province": null, "postal_code": "1234 AB", "country": "NL" }, "consignor": { "name": "Generic Company, LLC", "phone": "555-123-4567", "email": null, "id": null, "street1": "1 WORLD WAY", "street2": "", "city": "Indianapolis", "province": "IN", "postal_code": 60601, "country": "US" }, "create_label": false, "currency": "USD", "entry_point": "TEST01", "exit_point": "AMS", "freight_charge": { "amount": 12.26, "currency": "USD" }, "from": null, "height": 16.00, "ignore_bad_address": false, "insurance": false, "irregular": false, "is_return": false, "length": 13, "line_items": [ { "coo": "CN", "currency": "USD", "description": "Phone case", "dg_code": null, "hts_code": null, "origin_description": "手机外壳", "product_id": null, "quantity": 1, "supplier": "US23123131", "url": null, "value": 19.95, "weight": 0.276 } ], "order_number": "23018721-ABC", "overpack_id": 1291028, "service": "BoxC Parcel", "signature_confirmation": false, "terms": "DDP", "test": false, "to": { "company_name": null, "name": "John Smith", "phone": "555-888-4444", "email": "john@example.com", "street1": "108 N WESTGATE WAY", "street2": null, "city": "Amsterdam", "province": null, "postal_code": "1234 AB", "country": "NL" }, "weight": 0.276, "width": 10, "zonos_customer_id": "" } }' requestBody: required: true content: application/json: schema: type: object properties: shipment: $ref: '#/definitions/Shipment' required: - shipment responses: '200': description: OK content: application/json: schema: type: object properties: shipment: $ref: '#/definitions/Shipment' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: Request is malformed. status: error errors: - Request is malformed. badRequest: summary: Bad Request description: Shipment has uncancelled or processed labels value: code: 1201 message: Shipment has uncancelled or processed labels errors: - Shipment has uncancelled or processed labels notFound: summary: Not Found description: Credential not found value: code: 1450 message: Credential not found errors: - Credential not found languageError: summary: Entry Point Language description: Origin description must be in the entry point's language value: code: 1222 message: Origin description must be in the entry point's language errors: - Origin description must be in the entry point's language descriptionError: summary: Description Unacceptable description: Description isn't acceptable value: code: 1223 message: Description isn't acceptable errors: - Description isn't acceptable noRoutes: summary: Bad Routes Request description: No routes found value: code: 1050 message: No routes found errors: - No routes found addressError: summary: Bad Address Request description: Address Error value: code: 1012 message: Address Error errors: - Address Error hsCode: summary: Missing Requirements description: An HS Code and description are required for all products. value: code: 1215 message: Shipment requires an HS Code and description for all line items errors: - Shipment requires an HS Code and description for all line items dutyRates: summary: Duty Rates description: Unable to get tax and/or duty rates for this shipment value: code: 1243 message: Unable to get tax and/or duty rates for this shipment errors: - Unable to get tax and/or duty rates for this shipment '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shipment not found value: code: 1210 message: Shipment not found errors: - Shipment not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Error while checking for denied parties value: code: 1010 message: Error while checking for denied parties errors: - Error while checking for denied parties labelError: summary: Server Error Creating Label description: Label could not be created. value: code: 1203 message: Label could not be created. errors: - Label could not be created. '503': description: Service Unavailable content: application/json: schema: $ref: '#/definitions/ServiceUnavailable' examples: ServerError: summary: Service Unavailable description: Address resolution service unavailable at this time. value: code: 503 message: Address resolution service unavailable at this time. errors: - Address resolution service unavailable at this time. delete: tags: - Shipments summary: DELETE /shipments/{id} description: Deletes a shipment. operationId: deleteShipment consumes: - application/json produces: - application/json security: - JWT: - write_shipments parameters: - name: id in: path description: The shipment ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/shipments/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotDelete: summary: Bad Request description: Shipment can't be deleted value: code: 1212 message: Shipment can't be deleted errors: - Shipment can't be deleted cannotDeleteOverpack: summary: Bad Request Overpack description: Shipments that are linked to an overpack can't be deleted value: code: 1218 message: Shipments that are linked to an overpack can't be deleted errors: - Shipments that are linked to an overpack can't be deleted '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shipment not found value: code: 1210 message: Shipment not found errors: - Shipment not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Shipment can't be deleted value: code: 1212 message: Shipment can't be deleted errors: - Shipment can't be deleted /shipments/{id}/process: put: tags: - Shipments summary: PUT /shipments/{id}/process description: Process a shipment with the final measured weight and dimensions. Useful for clients that process shipments at their own facilities. Only select clients are authorized to perform this action. This changes shipment status to Processed and can't be reversed.

Note: Multi-package shipments can't be processed this way as of now.

operationId: processShipment consumes: - application/json produces: - application/json security: - JWT: - write_shipments PrivilegedClient: [] parameters: - name: id in: path description: The shipment ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/shipments/{id}/process \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "shipment": { "datetime": "2024-11-02 11:12:13", "fulfillment_id": null, "height": 1.00, "length": 15, "weight": 0.088, "width": 8, "irregular": false } }' requestBody: required: true content: application/json: schema: $ref: '#/definitions/ShipmentProcessRequest' responses: '200': description: OK content: application/json: schema: type: object properties: shipment: properties: status: type: string description: The updated shipment status. example: Processed enum: - Processed '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /shipment: The required properties (weight) are missing' status: error errors: - '/shipment: The required properties (weight) are missing' badRequest: summary: Bad Request description: Shipment has no labels value: code: 1202 message: Shipment has no labels errors: - Shipment has no labels noRoutes: summary: Bad Routes Request description: No routes found value: code: 1050 message: No routes found errors: - No routes found '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shipment not found value: code: 1210 message: Shipment not found errors: - Shipment not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: There was an error while charging the account balance value: code: 1082 message: There was an error while charging the account balance errors: - There was an error while charging the account balance /shops: get: tags: - Shops summary: GET /shops description: Retrieves a list of shops. operationId: getShops consumes: - application/json produces: - application/json security: - JWT: - read_shops parameters: - in: query name: limit description: The number of results to return. required: false type: integer default: 50 maximum: 100 - in: query name: name description: Filter that searches for shops with a similar name. default: null required: false type: string - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/shops\?limit=50\&name=PhoneBlox responses: '200': description: OK content: application/json: schema: type: object properties: shops: type: array items: $ref: '#/definitions/Shop' next_page: type: string description: Page token. Set by the system. example: null '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Shops summary: POST /shops description: Creates a new shop. operationId: addShop consumes: - application/json produces: - application/json security: - JWT: - write_shops x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/shops \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "shop": { "id": "my-shop", "active": true, "name": "Appleseeds", "settings": { "delay_processing": 240 }, "type": "BoxC" } }' requestBody: required: true content: application/json: schema: type: object properties: shop: $ref: '#/definitions/Shop' required: - shop responses: '201': description: Created content: application/json: schema: type: object description: Shop object properties: shop: $ref: '#/definitions/Shop' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /shop: The required properties (name) are missing' status: error errors: - '/shop: The required properties (name) are missing' badRequest: summary: Bad Request description: Shop ID is already in use value: code: 1373 message: Shop ID is already in use errors: - Shop ID is already in use '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Shop can't be created value: code: 1372 message: Shop can't be created errors: - Shop can't be created /shops/{id}: get: tags: - Shops summary: GET /shops/{id} description: Retrieves a shop. operationId: getShopsById consumes: - application/json produces: - application/json security: - JWT: - read_shops parameters: - name: id in: path description: The shop ID required: true type: string maxLength: 32 x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/shops/{id} responses: '200': description: OK content: application/json: schema: type: object properties: shop: $ref: '#/definitions/Shop' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shop not found value: code: 1370 message: Shop not found errors: - Shop not found '429': $ref: '#/definitions/RateLimit' put: tags: - Shops summary: PUT /shops/{id} description: Updates a shop. operationId: updateShop consumes: - application/json produces: - application/json security: - JWT: - write_shops parameters: - name: id in: path description: The shop ID required: true type: string maxLength: 32 x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/shops/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "shop": { "active": true, "name": "Appleseeds", "settings": { "delay_processing": 200 }, "type": "BoxC" } }' requestBody: required: true content: application/json: schema: type: object description: Shop object properties: shop: $ref: '#/definitions/ShopPut' responses: '200': description: OK content: application/json: schema: type: object description: Shop object properties: shop: $ref: '#/definitions/Shop' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: Request is malformed. status: error errors: - Request is malformed. '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shop not found value: code: 1370 message: Shop not found errors: - Shop not found '429': $ref: '#/definitions/RateLimit' delete: tags: - Shops summary: DELETE /shops/{id} description: Deletes a shop. operationId: deleteShop consumes: - application/json produces: - application/json security: - JWT: - write_shops parameters: - name: id in: path description: The shop ID required: true type: string maxLength: 32 x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/shops/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: cannotDelete: summary: Bad Request description: Shop can't be deleted value: code: 1371 message: Shop can't be deleted errors: - Shop can't be deleted '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shop not found value: code: 1370 message: Shop not found errors: - Shop not found '429': $ref: '#/definitions/RateLimit' /track: post: tags: - Track summary: POST /track description: Certified Accounts may inject up to 100 events into BoxC's tracking history. Shipments must belong to the user; otherwise, the request will be aborted without events being added. operationId: addTrackingEvents consumes: - application/json produces: - application/json security: - JWT: - write_shipments x-badges: - name: Beta position: after x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ --location 'http://localhost:10000/v1/track' \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ --data '{ "events": [ { "tracking_number": "CH957707285DE", "code": 105, "province": null, "postal_code": null, "city": "Shenzhen", "country": "CN", "time": "2026-03-11T10:05:08+01:00" } ] }' requestBody: required: true content: application/json: schema: $ref: '#/definitions/TrackPost' responses: '201': description: Created '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: notFound: summary: Bad Request description: Shipment not found or doesn't belong to user value: code: 1211 message: 'Shipment not found or doesn''t belong to user: %s' errors: - 'Shipment not found or doesn''t belong to user: %s' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /track/{trackingNumber}: get: tags: - Track summary: GET /track/{trackingNumber} description: Get events for a shipment using its tracking number. operationId: getTrackingEvents produces: - application/json security: - JWT: [] parameters: - name: trackingNumber in: path description: The final tracking number or tracking number for a generic shipment label. required: true type: string maxLength: 40 - name: email in: query description: The email address of the shipping address. Provide this to reveal images if you're not the owner of the shipment. required: false type: string - name: postal_code in: query description: The postal code of the shipping address. Provide this to reveal images if you're not the owner of the shipment. It will only work if the postal code is not revealed in the event history. required: false type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/track/{trackingNumber} responses: '200': description: OK content: application/json: schema: $ref: '#/definitions/Track' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Shipment not found value: code: 1210 message: Shipment not found errors: - Shipment not found '429': $ref: '#/definitions/RateLimit' /users/me: get: tags: - Users summary: GET /users/me description: Retrieves this user. operationId: getThisUser consumes: - application/json produces: - application/json security: - JWT: - openid profile email x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/users/me responses: '200': description: OK content: application/json: schema: type: object properties: user: $ref: '#/definitions/User' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: User not found. content: application/json: schema: type: string example: User not found '429': $ref: '#/definitions/RateLimit' put: tags: - Users summary: PUT /users/me description: Updates a user. operationId: updateUser consumes: - application/json produces: - application/json security: - JWT: - openid profile email x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/users/me \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "user": { "address": { "company_name": "Terracotta Warriors Ltd, Co", "street1": "4 Jing Shan Qian Jie", "street2": "Dongcheng", "city": "Beijing", "province": "Hebei", "postal_code": "100009", "country": "CN" } } }' requestBody: content: application/json: schema: type: object description: User object properties: user: type: object properties: address: $ref: '#/definitions/Address' required: - user responses: '200': description: OK content: application/json: schema: type: object description: User object properties: user: $ref: '#/definitions/User' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /user/address: The required properties (street1) are missing.' status: error errors: - '/user/address: The required properties (street1) are missing.' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /validate-address: post: tags: - ValidateAddress summary: POST /validate-address description: Get validated possible matches of provided postal addresses. operationId: validateAddress consumes: - application/json produces: - application/json security: - JWT: - validate x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/validate-address \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "addresses": [ { "street1": "113 INTL BROADWAY", "street2": "", "city": "LOS ANGELES", "province": "CA", "postal_code": "91013", "country": "US" } ] }' requestBody: content: application/json: schema: type: object properties: addresses: type: array items: $ref: '#/definitions/ValidateAddress' required: - addresses responses: '200': description: OK content: application/json: schema: type: object properties: addresses: type: array items: $ref: '#/definitions/ValidatedAddress' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: Request is malformed. status: error errors: - Request is malformed. addressError: summary: Address Validation description: Unable to validate address due to an error value: code: 1425 message: Unable to validate address due to an error errors: - Unable to validate address due to an error '401': $ref: '#/definitions/Unauthorized' '402': $ref: '#/definitions/PaymentRequired' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: balanceError: summary: Server Error - Retrieving Balance description: There was an error while fetching the account balance value: code: 1081 message: There was an error while fetching the account balance errors: - There was an error while fetching the account balance chargingError: summary: Server Error - Charging Account description: There was an error while charging the account balance value: code: 1082 message: There was an error while charging the account balance errors: - There was an error while charging the account balance /warehouses: get: tags: - Warehouses summary: GET /warehouses description: Retrieves a list of warehouses. operationId: getWarehouses consumes: - application/json produces: - application/json security: - JWT: [] x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/warehouses responses: '200': description: OK content: application/json: schema: type: object properties: warehouses: type: array title: Warehouse items: $ref: '#/definitions/WarehouseStorage' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' /warehouses/{id}: get: tags: - Warehouses summary: GET /warehouses/{id} description: Retrieves a warehouse. operationId: getWarehousesById consumes: - application/json produces: - application/json security: - JWT: [] parameters: - name: id in: path description: The warehouse ID required: true type: string minLength: 8 maxLength: 8 x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/warehouses/{id} responses: '200': description: OK content: application/json: schema: type: object properties: warehouse: $ref: '#/definitions/Warehouse' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Warehouse not found value: code: 1360 message: Warehouse not found errors: - Warehouse not found '429': $ref: '#/definitions/RateLimit' /webhooks: get: tags: - Webhooks summary: GET /webhooks description: Retrieves a list of webhooks. operationId: getWebhooks consumes: - application/json produces: - application/json security: - JWT: - read_webhooks parameters: - in: query name: limit description: The number of results to return. default: 50 maximum: 100 required: false type: integer - in: query name: order description: The sort order of the results. Options are "asc" for ascending, or "desc" for descending. default: desc required: false type: string - in: query name: page_token description: Used for selecting the page after the initial query. required: false type: string x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/webhooks\?limit=50\&order=desc responses: '200': description: OK content: application/json: schema: type: object properties: webhooks: type: array items: $ref: '#/definitions/Webhook' next_page: type: string description: Page token. example: null '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: invalidToken: summary: Bad Request description: Invalid page token value: code: 1025 message: Invalid page token errors: - Invalid page token '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' post: tags: - Webhooks summary: POST /webhooks description: Creates a webhook. Clients may create multiple webhooks for the same user and topic as long as the `address` is unique. operationId: addWebhook consumes: - application/json produces: - application/json security: - JWT: - write_webhooks x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/webhooks \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "webhook": { "address": "https://www.boxc.com/path/to/script", "key": "9FkaaYZILF9pWHqJzXDD", "topic": "shipments_status" } }' requestBody: required: true content: application/json: schema: type: object description: Webhook object properties: webhook: type: object properties: address: description: The URL for the webhook that will process the event. It can be updated. type: string format: uri maxLength: 128 example: https://www.boxc.com/path/to/script key: description: A secret key set by the application or user and used for calculating the HMAC digest of a webhook event. It can be updated but is not readable after creation. It doesn't have to be unique. type: string example: 9FkaaYZILF9pWHqJzXDD minLength: 16 maxLength: 40 topic: description: The topic the user wishes to subscribe to. Immutable. type: string example: shipments_status required: - address - key - topic required: - webhook responses: '201': description: OK content: application/json: schema: type: object description: Webhook object properties: webhook: $ref: '#/definitions/Webhook' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /webhook: The required properties (topic) are missing' status: error errors: - '/webhook: The required properties (topic) are missing' badRequest: summary: Bad Request description: User is already subscribed to topic value: code: 1401 message: User is already subscribed to topic errors: - User is already subscribed to topic '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Webhook can't be created value: code: 1402 message: Webhook can't be created errors: - Webhook can't be created /webhooks/{id}: get: tags: - Webhooks summary: GET /webhooks/{id} description: Retrieves a webhook. operationId: getWebhooksById consumes: - application/json produces: - application/json security: - JWT: - read_webhooks parameters: - name: id in: path description: The webhook ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -H "Authorization: Bearer " \ -H "Accept: application/json" \ https://api.boxc.com/v1/webhooks/{id} responses: '200': description: OK content: application/json: schema: type: object properties: webhook: $ref: '#/definitions/Webhook' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Webhook not found value: code: 1400 message: Webhook not found errors: - Webhook not found '429': $ref: '#/definitions/RateLimit' put: tags: - Webhooks summary: PUT /webhooks/{id} description: Updates a webhook. operationId: updateWebhook consumes: - application/json produces: - application/json security: - JWT: - write_webhooks parameters: - name: id in: path description: The webhook ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X PUT https://api.boxc.com/v1/webhooks/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "webhook": { "address": "https://www.boxc.com/path/to/script" } }' requestBody: required: true content: application/json: schema: type: object properties: webhook: type: object properties: address: description: The URL for the webhook that will process the event. type: string format: uri maxLength: 128 example: https://www.boxc.com/path/to/script required: - webhook responses: '200': description: OK content: application/json: schema: type: object description: Webhook object properties: webhook: $ref: '#/definitions/Webhook' '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: validation: summary: Validation error description: The request schema is invalid. value: code: 1000 message: 'Validation Error. /webhook/key: Minimum string length is 16, found 12' status: error errors: - 'Validation Error. /webhook/key: Minimum string length is 16, found 12' '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Webhook not found value: code: 1400 message: Webhook not found errors: - Webhook not found '429': $ref: '#/definitions/RateLimit' delete: tags: - Webhooks summary: DELETE /webhooks/{id} description: Deletes a webhook. operationId: deleteWebhook consumes: - application/json produces: - application/json security: - JWT: - write_webhooks parameters: - name: id in: path description: The webhook ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X DELETE https://api.boxc.com/v1/webhooks/{id} \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" responses: '200': description: OK '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Webhook not found value: code: 1400 message: Webhook not found errors: - Webhook not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Webhook can't be deleted value: code: 1404 message: Webhook can't be deleted errors: - Webhook can't be deleted /webhooks/{id}/queue: post: tags: - Webhooks summary: POST /webhooks/{id}/queue description: Adds an event to the webhook's queue for testing your subscriptions. Refer to [Webhooks](/#tag/Webhooks) for sample payloads. operationId: addWebhookEvent consumes: - application/json produces: - application/json security: - JWT: - write_webhooks parameters: - name: id in: path description: The webhook ID required: true type: integer x-codeSamples: - lang: cURL label: cURL source: | curl -X POST https://api.boxc.com/v1/webhooks/{id}/queue \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "shipment": { "chargeable_weight": 0.4, "comments": [ "Order123456" ], "entry_point": "TEST01", "event": { "carrier": "USPS", "code": 200, "city": "AUSTIN", "province": "TX", "postal_code": "78701", "country": "US", "time": "2019-10-10 12:12:12" }, "exit_point": "DFW", "gross_weight": 0.235, "id": 1521231, "order_number": null, "service": "BoxC Parcel", "status": "Delivered", "tracking_number": "9261290185965500000103", "volumetric_weight": 0.4 } }' responses: '201': description: Created content: null '400': description: Bad Request content: application/json: schema: $ref: '#/definitions/BadRequest' examples: badRequest: summary: Bad Request description: Webhook event can't be enqueued due to an error value: code: 1405 message: Webhook event can't be enqueued due to an error errors: - Webhook event can't be enqueued due to an error '401': $ref: '#/definitions/Unauthorized' '403': $ref: '#/definitions/Forbidden' '404': description: Not Found content: application/json: schema: $ref: '#/definitions/NotFound' examples: notFound: summary: Not Found description: Webhook not found value: code: 1400 message: Webhook not found errors: - Webhook not found '429': $ref: '#/definitions/RateLimit' '500': description: Internal Server Error content: application/json: schema: $ref: '#/definitions/InternalServerError' examples: internalServerError: summary: Internal Server Error description: Webhook event can't be enqueued due to an error value: code: 1405 message: Webhook event can't be enqueued due to an error errors: - Webhook event can't be enqueued due to an error definitions: Address: $ref: '#/definitions/address' BadRequest: $ref: '#/definitions/bad-request' CalculateDuty: $ref: '#/definitions/calculate-duty' Classify: $ref: '#/definitions/classify' Code: $ref: '#/definitions/code' Consignee: $ref: '#/definitions/consignee' Consignor: $ref: '#/definitions/consignor' Credential: $ref: '#/definitions/credential' CredentialPut: $ref: '#/definitions/credential-put-request' CustomsProduct: $ref: '#/definitions/customs-product' Destination: $ref: '#/definitions/destination' EntryPoint: $ref: '#/definitions/entry-point' Estimate: $ref: '#/definitions/estimate' Event: $ref: '#/definitions/event' Forbidden: $ref: '#/definitions/forbidden' From: $ref: '#/definitions/from' Fulfillment: $ref: '#/definitions/fulfillment' FulfillmentLineItem: $ref: '#/definitions/fulfillment-line-item' Inbound: $ref: '#/definitions/inbound' InboundShipments: $ref: '#/definitions/inbound-shipments' InboundProduct: $ref: '#/definitions/inbound-product' InboundUpdate: $ref: '#/definitions/inbound-put' InternalServerError: $ref: '#/definitions/internal-server-error' Invoice: $ref: '#/definitions/invoice' Label: $ref: '#/definitions/label' LabelPostBulkRequest: $ref: '#/definitions/label-post-bulk-request' LabelPatch: $ref: '#/definitions/label-patch' LineItem: $ref: '#/definitions/line-item' LineItemCompliance: $ref: '#/definitions/line-item-compliance' Manifest: $ref: '#/definitions/manifest' ManifestItem: $ref: '#/definitions/manifest-item' Message: $ref: '#/definitions/message' NotFound: $ref: '#/definitions/not-found' Order: $ref: '#/definitions/order' OrderLineItem: $ref: '#/definitions/order-line-item' Overpack: $ref: '#/definitions/overpack' OverpackList: $ref: '#/definitions/overpack-list' Package: $ref: '#/definitions/package' PackageContents: $ref: '#/definitions/package-contents' PackageEstimate: $ref: '#/definitions/package-estimate' PaymentRequired: $ref: '#/definitions/payment-required' Product: $ref: '#/definitions/product' ProductWarehouse: $ref: '#/definitions/product-warehouse' RateLimit: $ref: '#/definitions/rate-limit' Reshipment: $ref: '#/definitions/reshipment' Return: $ref: '#/definitions/return' Service: $ref: '#/definitions/service' ServiceUnavailable: $ref: '#/definitions/service-unavailable' Settings: $ref: '#/definitions/settings' Shipment: $ref: '#/definitions/shipment' ShipmentImages: $ref: '#/definitions/shipment-images' ShipmentProcessRequest: $ref: '#/definitions/shipment-process-request' Shop: $ref: '#/definitions/shop' ShopPut: $ref: '#/definitions/shop-put' Sku: $ref: '#/definitions/sku' Subscription: $ref: '#/definitions/subscription' To: $ref: '#/definitions/to' Track: $ref: '#/definitions/track' TrackPost: $ref: '#/definitions/track-add' Unauthorized: $ref: '#/definitions/unauthorized' User: $ref: '#/definitions/user' ValidateAddress: $ref: '#/definitions/validate-address' ValidatedAddress: $ref: '#/definitions/validated-address' ValidatedAddressMatch: $ref: '#/definitions/validated-address-match' Warehouse: $ref: '#/definitions/warehouse' WarehouseStorage: $ref: '#/definitions/warehouse-storage' Webhook: $ref: '#/definitions/webhook' address: description: This is the user's personal or company address and may not be the same as the consignor. type: object properties: company_name: description: The company name. type: string maxLength: 40 example: Terracotta Warriors Ltd, Co street1: description: The company's street address. type: string maxLength: 50 example: 4 Jing Shan Qian Jie street2: description: Additional space for the company's street address. type: - string - 'null' default: null maxLength: 50 example: Dongcheng city: description: The company's city. type: string maxLength: 40 example: Beijing province: description: The company's province. Required for some countries. type: - string - 'null' default: null maxLength: 40 example: Hebei postal_code: description: The company's postal code. Required for some countries. type: - string - 'null' maxLength: 10 example: '100009' default: null country: description: The company's country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. type: string pattern: /^[A-Z]{2}$/ example: CN required: - company_name - street1 - city - country bad-request: type: object summary: Bad Request description: Validation error with the request properties: code: description: Error code. Refer to the list of [Errors](/#tag/Errors). type: integer message: description: Error message explaining the code. type: string status: type: string enum: - error example: error errors: description: Lists validation errors with the schema or the resource being operated on. type: array minItems: 1 maxItems: 5 items: type: string calculate-duty: type: object title: Calculate Duty properties: currency: description: The ISO 4217 currency code. The result `tax` and `duty` values will be in this currency. The `insurance` and `shipping` values provided in the request must also be in this currency. type: string pattern: ^[A-Z]{3}$ example: USD destination: type: object description: Details about the origin of the shipment. properties: city: type: - string - 'null' default: null maxLength: 40 example: New York province: type: - string - 'null' default: null maxLength: 40 example: NY postal_code: type: - string - 'null' maxLength: 40 example: null default: null country: type: string pattern: ^[A-Z]{2}$ example: US required: - country insurance: description: Amount paid for insuring the shipment. type: number minimum: 0 default: 0 example: 0 origin: type: object description: Details about the destination of the shipment. properties: city: type: - string - 'null' default: null maxLength: 40 example: null province: type: - string - 'null' default: null maxLength: 40 example: null postal_code: type: - string - 'null' maxLength: 40 example: null default: null country: type: string pattern: ^[A-Z]{2}$ example: CN required: - country products: type: array minItems: 1 maxItems: 20 items: type: object properties: coo: description: The product's country of origin. type: string pattern: ^[A-Z]{2}$ example: CN currency: description: The currency for the product value. type: string pattern: ^[A-Z]{3}$ example: CNY description: description: A short description of the product. type: string minLength: 3 maxLength: 64 example: Cotton T-Shirt duty: description: The calculated duty for the product. type: number readOnly: true minimum: 0 default: 0 example: 23.52 duty_rate: description: The calculated duty rate for the product. type: number readOnly: true minimum: 0 default: 0 example: 0.175 hs_code: description: The HS Code for the product. type: string minLength: 6 pattern: ^[0-9]{6,}$ example: 6109100040 quantity: description: The number of units of the product. type: integer minimum: 0 example: 10 tax: description: The calculated tax for the product. type: number readOnly: true minimum: 0 default: 0 example: 0 tax_rate: description: The calculated tax rate for the product. type: number readOnly: true minimum: 0 default: 0 example: 0 value: description: The per unit value of the product. type: number exclusiveMin: 0 example: 10 required: - coo - currency - description - hs_code - quantity - value shipping: description: Amount paid in shipping costs for the shipment. type: number minimum: 0 default: 0 example: 0 total: description: null type: object readOnly: true properties: duty: description: The total duty for all products. type: number minimum: 0 default: 0 example: 23.52 tax: description: The total tax for all products. type: number minimum: 0 default: 0 example: 0 required: - currency - origin - destination - products classify: x-extendedDiscriminator: summary type: object properties: summary: null destination_country: description: The destination country code. type: string pattern: - A-Z example: US minLength: 2 maxLength: 2 origin_country: description: The origin country code. type: string pattern: - A-Z example: CN minLength: 2 maxLength: 2 products: type: array description: List of products to classify. minimum: 1 maximum: 20 items: type: object properties: hs_code: type: string description: The HS code for the product if known. pattern: - 0-9 example: '610610' minLength: 6 maxLength: 10 description: type: string description: A description of the product. example: Sports Bra minLength: 3 maxLength: 128 result: readOnly: true type: object properties: import_hs_code: type: string description: The most likely 10-digit HS code of the product for the destination country. example: '6212109020' minLength: 10 maxLength: 10 export_hs_code: type: string description: The most likely 10-digit HS code of the product for the origin country. example: '6115950000' minLength: 10 maxLength: 10 description: type: string description: The most likely description of the product. example: Socks required: - description required: - destination_country - origin_country - products code: type: object description: Code describing a problem with the units after processing. properties: code: type: string description: Description of the issue. example: Insufficient units arrived. readOnly: true quantity: type: integer description: The number of units affected. example: 1 readOnly: true consignee: description: Details about the consignee / buyer. The system will use the shipping address as the consignee address if one isn't provided. Some countries require a tax / passport ID from the buyer. type: object properties: name: description: The consignee's name. type: string maxLength: 40 example: Addressee John phone: description: The consignee's phone number. Conditional. type: string maxLength: 20 example: 555-456-7890 email: description: The consignee's email address. Conditional. type: string maxLength: 64 example: null id: description: The consignee's Tax ID, GSTIN, Passport, ABN, Vendor ID, etc. Conditional. type: string maxLength: 20 example: null street1: description: The consignee's street address. type: string maxLength: 50 example: 2959 ANCHOR DR street2: description: Additional space for the consignee's street address such as apartment, condo, or unit number. type: string maxLength: 50 example: null city: description: The consignee's city. type: string maxLength: 40 example: MESQUITE province: description: The consignee's province or state code. Conditional. type: string maxLength: 40 example: TX postal_code: description: The consignee's postal code. Conditional. type: string maxLength: 10 example: 75150 country: description: The consignee's country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. type: string maxLength: 2 example: US required: - name - city - country - street1 consignor: description: Address and other details for the consignor (sender) which is used for customs clearance. type: object properties: name: description: The consignor's name. type: string maxLength: 40 example: Generic Company, LLC phone: description: The consignor's phone number. type: string maxLength: 20 example: 555-123-4567 email: description: The consignor's email address. Conditional. type: string maxLength: 64 default: null example: null id: description: The consignor's Tax ID, GSTIN, Passport, ABN, Vendor ID, etc. Conditional. type: string maxLength: 20 example: null street1: description: The consignor's street address. type: string maxLength: 50 example: 1 WORLD WAY street2: description: Additional space for the consignor's street address such as apartment, condo, or unit number. type: string maxLength: 50 example: '' city: description: The consignor's city. type: string maxLength: 40 example: SHENZHEN province: description: The consignor's province or state code. Conditional. type: string maxLength: 40 example: GUANGDONG postal_code: description: The consignor's postal code. Conditional. type: string maxLength: 10 example: 518000 country: description: The consignor's country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. type: string maxLength: 2 example: CN required: - name - phone - street1 - city - country credential: type: object properties: id: description: The credential ID. type: integer example: 100020 readOnly: true user_id: description: The user ID. type: integer example: 12006 readOnly: true carrier: description: The carrier for this credential. Carriers that support parameters can be found in the [Carrier Credentials](/#tag/CarrierCredentials) section. type: string example: DeutschePost params: description: The carrier specific parameters. Supported parameters can be found in the [Carrier Credentials](/#tag/CarrierCredentials) section. type: object updated: description: The datetime in UTC the credential was updated. type: string format: datetime example: '2024-06-01 19:04:51' readOnly: true created: description: The datetime in UTC the credential was created. type: string format: datetime example: '2024-05-20 10:11:12' readOnly: true deleted: description: The datetime in UTC the credential was deleted. type: string format: datetime example: '2024-06-20 04:22:18' readOnly: true required: - carrier - params credential-put-request: type: object properties: credential: type: object properties: carrier: description: The carrier code type: string example: DHLeC params: description: The carrier specific parameters. Supported parameters can be found in the [Carrier Credentials](/#tag/CarrierCredentials) section. type: object example: client_id: 1223asdadaa12 client_secret: '12312312312312' required: - carrier - params required: - credential customs-product: type: object properties: affirmation_of_compliance: type: - array - 'null' default: null example: - code: FME value: K - code: FSX value: '' minItems: 1 maxItems: 5 description: The affirmation of compliance is required for products of `type` "FOO". You may include up to 5 AOC codes to a product. items: oneOf: - type: object title: FME properties: code: type: string description: AOC Code const: FME example: FME value: type: string description: AOC Value enum: - A - B - C - D - E - F - K example: K required: - code - value - type: object title: FSVP properties: code: type: string description: AOC Code const: FSX example: FSX value: type: string description: AOC Value. Always an empty string. const: '' example: '' required: - code - type: object title: Other properties: code: type: string description: AOC Code enum: - PFR - CFR - GFR - IFR - ORN - SFR - SRN example: FME value: type: string description: AOC Value example: K minLength: 1 maxLength: 15 required: - code - value brand_name: type: string description: Brand name pattern: - A-Z0-9\s minLength: 3 maxLength: 35 example: Test code: type: - string - 'null' default: null minLength: 7 maxLength: 7 description: The importing country's government's code for this product. Refer to https://www.accessdata.fda.gov/scripts/ora/pcb/index.cfm?action=main.pcb for FDA codes. example: 1234-57 coi: type: string pattern: - A-Z minLength: 2 maxLength: 2 description: Country of import code example: US coo: type: string pattern: - A-Z minLength: 2 maxLength: 2 description: Country of origin code example: CN compliance_code: type: - array - 'null' description: The compliance code requirement and options depend on the `type`. default: null example: - code: COS value: '1231231' items: type: object properties: code: type: string description: Code example: COS value: type: string description: Value maxLength: 20 minLength: 1 example: '1243123' required: - code - value contact: type: object description: Point of contact information for the `importer` and `prior_notice_submitter`. example: name: John Doe email: john@doe.com phone: '1231231234' properties: email: type: string maxLength: 64 description: Contact's email address default: null example: john@doe.com name: type: string maxLength: 40 description: Contact's full name default: null example: John Doe phone: type: string maxLength: 20 description: Contact's phone number default: null example: '1231231234' required: - email - name - phone created_at: type: string description: The date and time this product was created. example: '2025-08-29 12:13:14' readOnly: true deleted_at: type: string description: The date and time this product was deleted. example: '2025-08-29 19:11:33' readOnly: true description: type: string description: Product description pattern: - A-Z0-9\s minLength: 3 maxLength: 45 example: Test fsvp_importer: type: object description: FSVP (Foreign Supplier Verification Program) Importer of the product. Required for products where `type` is "FOO". example: exempt: false use_consignor: false id: type: DUNS value: '1231231' address: name: Test street1: test street2: null city: test province: null postal_code: null country: CN email: test@mail.com phone: 1234-47223 properties: exempt: type: boolean description: Indicates this product is exempt from Foreign Supplier Verification Program (FSVP). If `false` then FSVP details must be provided. default: false example: true use_consignor: type: boolean description: Option to use the shipment's `consignor` address. If false then an `address` must be provided. example: false id: type: object description: FSVP Importer id properties: type: type: string enum: - DUNS - FEI value: type: string maxLength: 32 required: - type - value address: type: object description: Address and contact information for the FSVP Importer if `use_consignor=false`. properties: name: type: - string - 'null' maxLength: 40 default: null description: Name street1: type: - string - 'null' default: null description: Street address 1 maxLength: 50 street2: type: - string - 'null' default: null description: Street address 2 maxLength: 50 city: type: - string - 'null' default: null description: City maxLength: 40 province: type: - string - 'null' default: null description: Province or state code maxLength: 40 postal_code: type: - string - 'null' default: null description: Postal code maxLength: 10 country: type: - string - 'null' pattern: - A-Z default: null description: Country code maxLength: 2 minLength: 2 email: type: - string - 'null' default: null description: E-mail address maxLength: 64 phone: type: - string - 'null' default: null description: Phone number maxLength: 20 required: - name - street1 - city - country - email - phone required: - use_consignor id: description: Product ID type: integer readOnly: true example: 121006 importer: type: object description: Importing party for this product. example: use_consignor: false address: name: Test street1: test street2: null city: test province: null postal_code: null country: CN email: test@mail.com phone: 1234-47223 properties: use_consignor: type: boolean description: Option to use the shipment's `consignor` address. If false then an address must be provided. address: type: object description: Address and contact information for the importer if `use_consignor=false`. properties: name: type: - string - 'null' maxLength: 40 default: null description: Name street1: type: - string - 'null' default: null description: Street address 1 maxLength: 50 street2: type: - string - 'null' default: null description: Street address 2 maxLength: 50 city: type: - string - 'null' default: null description: City maxLength: 40 province: type: - string - 'null' default: null description: Province or state code maxLength: 40 postal_code: type: - string - 'null' default: null description: Postal code maxLength: 10 country: type: - string - 'null' pattern: - A-Z default: null description: Country code maxLength: 2 minLength: 2 email: type: - string - 'null' default: null description: E-mail address maxLength: 64 phone: type: - string - 'null' default: null description: Phone number maxLength: 20 required: - name - street1 - city - country - email - phone required: - use_consignor intended_use_code: type: string description: The intended use code options depends on the `type` of product and `coi`. example: '100.000' manufacturer: type: object description: Manufacturer of the product. example: use_consignor: false id: type: DUNS value: '1231231' address: name: Test street1: test street2: null city: test province: null postal_code: null country: CN email: test@mail.com phone: 1234-47223 properties: use_consignor: type: boolean description: Option to use the shipment's `consignor` address. If false then an address must be provided. id: type: object description: Manufacturer id properties: type: type: string enum: - DUNS - FEI value: type: string maxLength: 32 required: - type - value address: type: object description: Address and contact information for the manufacturer if `use_consignor=false`. properties: name: type: - string - 'null' maxLength: 40 default: null description: Name street1: type: - string - 'null' default: null description: Street address 1 maxLength: 50 street2: type: - string - 'null' default: null description: Street address 2 maxLength: 50 city: type: - string - 'null' default: null description: City maxLength: 40 province: type: - string - 'null' default: null description: Province or state code maxLength: 40 postal_code: type: - string - 'null' default: null description: Postal code maxLength: 10 country: type: - string - 'null' pattern: - A-Z default: null description: Country code maxLength: 2 minLength: 2 email: type: - string - 'null' default: null description: E-mail address maxLength: 64 phone: type: - string - 'null' default: null description: Phone number maxLength: 20 required: - name - street1 - city - country - email - phone required: - use_consignor packaging: type: - object - 'null' default: null description: New container product packaging details. example: type: BOX quantity: 2 properties: type: type: string description: Packaging type enum: - CTN - BOX - PKG - BAG - CS - JAR - BOT - TBE - CAN - PKT - SAC - EA example: CTN quantity: type: integer description: Packing unit count exclusiveMinimum: 0 exclusiveMaximum: 10000 example: 2 required: - type - quantity prior_notice_submitter: type: object description: Prior notice submitter is required for some product types. example: use_consignor: false address: name: Test street1: test street2: null city: test province: null postal_code: null country: CN email: test@mail.com phone: 1234-47223 properties: use_consignor: type: boolean description: Option to use the shipment's `consignor` address. If false then an address must be provided. address: type: object description: Address and contact information for the prior notice submitter if `use_consignor=false`. properties: name: type: - string - 'null' maxLength: 40 default: null description: Name street1: type: - string - 'null' default: null description: Street address 1 maxLength: 50 street2: type: - string - 'null' default: null description: Street address 2 maxLength: 50 city: type: - string - 'null' default: null description: City maxLength: 40 province: type: - string - 'null' default: null description: Province or state code maxLength: 40 postal_code: type: - string - 'null' default: null description: Postal code maxLength: 10 country: type: - string - 'null' pattern: - A-Z default: null description: Country code maxLength: 2 minLength: 2 email: type: - string - 'null' default: null description: E-mail address maxLength: 64 phone: type: - string - 'null' default: null description: Phone number maxLength: 20 required: - name - street1 - city - country - email - phone required: - use_consignor processing_code: type: - string - 'null' description: The processing code depends on the `type`. default: null example: ADD quantity: description: Base product quantity type: - number - 'null' exclusiveMinimum: 0 exclusiveMaximum: 10000000 default: null example: 123.51 shipper: type: object description: Shipper for this product. example: use_consignor: false address: name: Test street1: test street2: null city: test province: null postal_code: null country: CN email: test@mail.com phone: 1234-47223 properties: use_consignor: type: boolean description: Option to use the shipment's `consignor` address. If false then an address must be provided. address: type: object description: Address and contact information for the shipper if `use_consignor=false`. properties: name: type: - string - 'null' maxLength: 40 default: null description: Name street1: type: - string - 'null' default: null description: Street address 1 maxLength: 50 street2: type: - string - 'null' default: null description: Street address 2 maxLength: 50 city: type: - string - 'null' default: null description: City maxLength: 40 province: type: - string - 'null' default: null description: Province or state code maxLength: 40 postal_code: type: - string - 'null' default: null description: Postal code maxLength: 10 country: type: - string - 'null' pattern: - A-Z default: null description: Country code maxLength: 2 minLength: 2 email: type: - string - 'null' default: null description: E-mail address maxLength: 64 phone: type: - string - 'null' default: null description: Phone number maxLength: 20 required: - name - street1 - city - country - email - phone required: - use_consignor type: type: string description: Product type. This value is immutable after creation. enum: - FOO - COS - FOO-CCW example: FOO uom: description: Unit of measurement for quantity. type: - string - 'null' enum: - 'null' - CG - CM3 - DOZ - DPC - DPR - FOZ - G - GAL - KG - L - LB - M3 - MCG - MG - ML - OZ - PCS - PRS - PTL - QTL - TOZ example: PCS default: null updated_at: type: string description: The date and time this product was last updated. example: '2025-08-29 14:10:14' readOnly: true required: - brand_name - coo - coi - contact - description - intended_use_code - manufacturer - importer - shipper - type - uom destination: type: object properties: city: type: string description: Destination city. example: BROOKLYN province: type: string description: Destination province. example: NY country: type: string description: Destination country. example: US port: type: string description: Destination port. example: JFK additionalProperties: false entry-point: type: object properties: address: description: The entry point's address with new lines. deprecated: true type: string example: |- WOC c/o Global Alliance Logistics (HK) Ltd Room 108, 1/F, Air Freight Forwarding Centre No. 2 Chun Wan Road, Chap Lap Kok, Lantau Isl., Hong Kong readOnly: true city: description: The entry point's city. type: string maxLength: 40 example: Hong Kong readOnly: true country: description: The entry point's country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. type: string pattern: - A-Z minLength: 2 maxLength: 2 example: HK readOnly: true delivery_address: description: The entry point's delivery address formatted and localized according to that country's standards. type: string example: |- WOC c/o Global Alliance Logistics (HK) Ltd Room 108, 1/F, Air Freight Forwarding Centre No. 2 Chun Wan Road, Chap Lap Kok, Lantau Isl., Hong Kong readOnly: true id: description: The ID of the entry point. type: string minLength: 6 maxLength: 6 example: HKG101 readOnly: true name: description: The addressee of the entry point. type: string maxLength: 40 example: BoxC C/O SDL readOnly: true notes: type: string description: Additional contact and delivery information. example: 聯繫人:ELAINE NG 聯繫方式:3899 2931 readOnly: true province: description: The entry point's province code. type: string maxLength: 40 default: null example: null readOnly: true postal_code: description: The entry point's postal code. type: string default: null example: null maxLength: 10 readOnly: true street1: description: The entry point's second street address if needed. maxLength: 50 type: string example: 元朗錦田新潭路逢吉鄉300 号DD107 readOnly: true street2: description: The entry point's second street address if needed. maxLength: 50 type: string default: null example: null readOnly: true estimate: type: object description: Retrieves an estimate. properties: estimate: type: object properties: currency: description: The ISO 4217 currency code for the **value** parameter and rates that are returned. type: string example: CAD readOnly: true entry_point: description: The code for the drop off location. See [Entry Points](/#tag/EntryPoints) for a list of codes. type: string default: null example: LAXI01 readOnly: true services: type: array readOnly: true items: $ref: '#/definitions/Service' event: type: object description: The tracking history for this label in descending order. Set by the system. properties: carrier: description: The carrier that provided this event. type: string example: USPS readOnly: true city: description: The city the event took place in. type: string maxLength: 40 example: New York City readOnly: true code: description: A code matching the description and to help identify the event. type: integer example: 200 readOnly: true country: description: The country code the event took place in. type: string maxLength: 2 minLength: 2 pattern: - A-Z example: US readOnly: true description: description: A description of the event. type: string example: DELIVERED readOnly: true latitude: description: Latitude coordinate of the event. type: - number - 'null' minimum: -90 maximum: 90 example: null readOnly: true longitude: description: Longitude coordinate of the event. type: - number - 'null' minimum: -180 maximum: 180 example: null readOnly: true postal_code: description: The postal code the event took place in. type: string maxLength: 10 example: '10001' readOnly: true province: description: The province the event took place in. type: string maxLength: 40 example: NY readOnly: true time: description: The local date and time the event occurred. type: string format: datetime default: null example: '2024-05-26 07:11:45' readOnly: true forbidden: description: Forbidden content: application/json: schema: type: object summary: Forbidden description: Error relating to insufficient permissions for a resource properties: code: description: Error code. Refer to the list of [Errors](/#tag/Errors). type: integer message: description: Error message explaining the code. type: string status: type: string enum: - error example: error errors: description: Displays processing error. type: array minItems: 1 maxItems: 1 items: type: string examples: revoked: summary: Forbidden Authorization Revoked description: 'Forbidden: Authorization revoked' value: code: 1008 message: 'Forbidden: Authorization revoked' errors: - 'Forbidden: Authorization revoked' scope: summary: Forbidden Scope description: 'Forbidden: Missing required scope' value: code: 1009 message: 'Forbidden: Missing required scope' errors: - 'Forbidden: Missing required scope' from: description: This will appear as the return address on labels. A default return address will be used if one isn't provided in the request. The country code must match ```to.country```. type: object title: ReturnAddress properties: name: description: Can be a sender's name or company name. type: string maxLength: 40 example: My Company Name street1: description: The sender's street address type: string maxLength: 50 example: 113 INTL BROADWAY street2: description: Additional space for the sender's street address. type: string maxLength: 50 default: null example: '' city: description: The sender's city. type: string maxLength: 40 example: LOS ANGELES province: description: The sender's province or state. Conditional. type: string maxLength: 40 example: CA default: null postal_code: description: The sender's postal code. Conditional. type: string maxLength: 10 example: '91013' default: null country: description: The senders's country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. type: string pattern: - A-Z maxLength: 2 minLength: 2 example: US required: - name - street1 - city - country fulfillment: type: object properties: created: description: The datetime this fulfillment was initiated. type: string example: '2024-06-17 15:43:03' fulfilled: description: The datetime this fulfillment was finalized. type: string example: '2024-06-27 08:33:49' fulfillment_fee: description: The fee for fulfilling this item or order. type: decimal example: 1.5 id: description: The unique ID for this fulfillment. type: integer example: 4923 packed: description: The datetime this fulfillment was packed. type: string example: '2024-06-18 11:09:24' packaging_fee: description: The fee for packaging the fulfillment. type: decimal example: 0.1 packaging_slip_fee: description: The fee for printing and including a packing slip. type: decimal example: 0.25 service: description: The shipping provider and/or service for this fulfillment. type: string example: BoxC Parcel shipment_id: description: The shipment ID if fulfilled by BoxC. type: integer example: 123456 shipping_cost: description: The cost of shipping this fulfillment using a third party. type: decimal example: 0 tracking_number: description: The tracking number for this fulfillment. type: string default: null example: '926149997649150002357' tracking_url: description: The tracking URL for this fulfillment if available. type: string format: uri example: https://track.boxc.com/?id=9261499976491500023573 fulfillment-line-item: type: object properties: product_id: description: The product ID. type: integer example: 1029 readOnly: true quantity: description: The product quantity that needs to be fulfilled. type: integer maxValue: 9999 example: 1 sku: description: The product SKU belonging to the order's shop. type: string example: '92820183446' inbound: type: object properties: carrier: description: The carrier for the inbound shipment. type: string maxLength: 32 default: null example: DHL created: description: The date and time the inbound shipment was created. type: datetime default: null example: '2024-05-17 14:00:00' readOnly: true id: description: The unique ID of the inbound shipment. type: integer example: 10000 readOnly: true notes: description: User defined notes for reference. type: string maxLength: 64 default: null example: 'Manufacturer: XYZ; Delivery: 9/2/24' processed_at: description: The date and time the inbound shipment was processed. type: datetime default: null example: '2024-06-03 18:20:54' readOnly: true products: type: array items: $ref: '#/definitions/InboundProduct' received: description: The date and time the inbound shipment was received at the warehouse. type: datetime default: null example: '2024-05-24 11:21:33' readOnly: true status: description: The status of the inbound shipment. type: string example: Pending readOnly: true tracking_number: type: string description: The tracking number for the inbound shipment. maxLength: 40 default: null example: '9261299991753900000290' warehouse: type: object $ref: '#/definitions/warehouse' inbound-shipments: type: object properties: carrier: description: The carrier for the inbound shipment. type: string maxLength: 32 default: null example: DHL created: description: The date and time the inbound shipment was created. Set by the system. type: string default: null example: '2024-05-17 14:00:00' readOnly: true id: description: The unique ID of the inbound shipment. Set by the system. type: integer example: 10000 readOnly: true notes: description: User defined notes for reference. type: string maxLength: 64 default: null example: 'Manufacturer: XYZ; Delivery: 9/2/24' processed_at: description: The date and time the inbound shipment was processed. type: datetime default: null example: '2024-06-03 18:20:54' readOnly: true received: description: The date and time the inbound shipment was received at the warehouse. Set by the system. type: string default: null example: null readOnly: true status: description: The status of the inbound shipment. Set by the system. type: string example: Pending readOnly: true tracking_number: type: string description: The tracking number for the inbound shipment. maxLength: 40 default: null example: '9261299991753900000290' warehouse: type: object $ref: '#/definitions/warehouse' inbound-product: type: object description: Inbound shipment product properties: cost: description: The cost per unit from the manufacturer for this product at the time of inbounding in USD. type: decimal example: 2.25 id: description: The product ID. type: integer example: 20111 is_packaging: description: Indicates this product is packaging material. type: boolean example: false readOnly: true name: description: The product name. type: string example: XL T-Shirt readOnly: true processed: description: The number of units processed by the warehouse. type: integer example: 300 readOnly: true quantity: description: The number of units being sent to the warehouse. type: integer example: 299 minimum: 1 codes: description: A list of codes describing problems with the units after processing. type: array readOnly: true items: $ref: '#/definitions/Code' inbound-put: type: object summary: InboundShipment properties: carrier: description: The carrier for the inbound shipment. type: string maxLength: 32 default: null example: DHL notes: description: User defined notes for reference. type: string maxLength: 64 default: null example: 'Manufacturer: XYZ; Delivery: 9/2/24' tracking_number: type: string description: The tracking number for the inbound shipment. maxLength: 40 default: null example: '9261299991753900000290' warehouse: type: object $ref: '#/definitions/warehouse' internal-server-error: type: object summary: Internal Server Error description: Processing Error properties: code: description: Error code. Refer to the list of [Errors](/#tag/Errors). type: integer message: description: Error message explaining the code. type: string status: type: string enum: - error example: error errors: description: Displays processing error. type: array minItems: 1 maxItems: 1 items: type: string invoice: type: object properties: created: type: string description: The date and time the invoice was created in UTC. example: '2024-07-03 13:57:13' format: datetime currency: type: string description: The 3-letter currency code for the amount in this invoice. example: USD end_date: type: string description: The end date of the invoice in UTC. example: '2024-06-30' id: type: integer description: The unique ID of the invoice. example: 901934 name: type: string description: The name of the invoice for grouping multiple invoices in different currencies together. example: 2024-W34 start_date: type: string description: The start date of the invoice in UTC. example: '2024-06-01' total: type: decimal description: The total billed amount of the invoice. example: 2359.56 label: type: object properties: cancelled: description: Whether or not the label was cancelled. type: boolean default: false example: false carrier: description: The final mile carrier for this label. type: string example: USPS readOnly: true chargeable_weight: description: The chargeable weight for this shipment which is the greater of gross weight and volumetric weight. type: decimal example: 0.3 readOnly: true contents: type: array readOnly: true description: List of contents in this package. default: [] minItems: 0 items: $ref: '#/definitions/PackageContents' cost: description: The shipping cost for the label. type: decimal example: 3.15 readOnly: true created: description: The date and time the label was created. type: string default: null example: '2024-05-17 15:43:03' readOnly: true delivery_date: description: The date the shipment was delivered. type: string default: null example: '2024-05-26 12:05:09' readOnly: true exit_point: description: The exit port for this shipment determined by the system. This value is null for shipments where exit port is determined irrelevant for the destination. type: string example: LAX readOnly: true events: description: The tracking history for this package in descending order. type: array readOnly: true items: $ref: '#/definitions/Event' height: description: The height of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 default: 1 example: 1.5 id: description: The unique ID of the label in the system. type: integer example: 2382131 readOnly: true insurance_fee: description: The cost of insurance for this shipment if requested. type: decimal default: 0 example: 0 readOnly: true is_master: description: Indicates this package is the master label. Default is true for single package shipments. type: boolean readOnly: true example: true is_ready: description: Indicates the label file is ready for download. This is true for most cases during shipment creation. Some carriers provide labels asynchronously. type: boolean example: true readOnly: true length: description: The length of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 default: 15 example: 15 overpack_id: description: The overpack ID assigned to this package. default: null type: - integer - 'null' example: 1501231 processed: description: Whether or not the label was processed at our facility. type: boolean default: false example: false readOnly: true processed_date: description: The date the label was first processed at a facility. type: string default: null example: '2024-05-27 19:14:55' readOnly: true processed_weight: description: The processed weight of the shipment at a facility. type: decimal default: null example: 0.284 readOnly: true service: type: string description: The type of shipping service this label is billed for. example: BoxC Parcel readOnly: true shipment_id: description: The ID of the shipment you want to create a label for, or is associated with the label. type: integer example: 1014 status: description: The latest status of the shipment. type: string enum: - Pending - Processed - Cancelled - Customs - En Route - Exception - Delivered example: Processed readOnly: true surcharge: description: Additional cost for this shipment based on the route and chargeable weight. type: decimal default: 0 example: 0 readOnly: true tracking_number: type: string description: The tracking number for the label. example: '9261299991753900000290' readOnly: true weight: description: The weight of the package in kg. type: decimal example: 0.202 exclusiveMinimum: 0 exclusiveMaximum: 10000 width: description: The width of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 default: 10 example: 8 label-post-bulk-request: type: object properties: labels: description: An array of `label.id` or `label.tracking_number`. type: array minItems: 1 maxItems: 100 items: type: string maxLength: 40 example: - '9261299991753900000301' - '9261299991753900000323' - '9261299991753900000339' required: - labels additionalProperties: false label-patch: type: object properties: cancelled: description: Set to `true` to cancel this label and remove the package from the overpack. type: boolean default: false example: true overpack_id: description: Set to `null` to remove this package from the overpack. default: null type: - integer - 'null' example: null line-item: type: object description: Contents of the shipment. properties: compliance: $ref: '#/definitions/LineItemCompliance' coo: description: The country of origin or where the product was manufactured in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. type: string example: CN currency: description: The ISO 4217 currency code of this line item's total declared value. type: string minLength: 3 maxLength: 3 example: USD description: description: A concise description of the line item in English. type: string maxLength: 64 example: Phone case dg_code: description: A code that identifies dangerous goods. Required if shipping lithium batteries, ORM-D, or other dangerous goods. Refer to [this page](/#tag/DangerousGoods) for a list of codes and further information. type: string default: null example: null duty: description: The duty owed for this line item in the `shipment.currency`. type: decimal readOnly: true example: 2.23 user_hts_code: description: The Harmonized Tariff System classification number for customs clearance based on the destination country provided by the user. type: string minLength: 8 maxLength: 13 default: null example: null readOnly: true hts_code: description: The Harmonized Tariff System classification number for customs clearance based on the destination country. type: string minLength: 8 maxLength: 13 default: null example: null origin_description: description: A concise description of the line item in the entry point country's language. type: string maxLength: 64 example: 手机外壳 product_id: description: The [Customs Product](/#tag/CustomsProducts) `id` which is required for international PGA shipments. This number is assigned when creating the product. type: integer example: 121009 default: null tax: description: The tax owed for this line item in the `shipment.currency`. type: decimal readOnly: true example: 2.23 quantity: description: The number of units in this line item. type: integer maxValue: 9999 example: 2 supplier: description: The product supplier or manufacturer. This is known as the Manufacturer Identification code (MID) in the US. It's required for most international shipments. type: string maxLength: 32 default: null url: description: A URL to the product listing online. type: string format: uri maxLength: 128 default: null example: null value: description: The total declared value of all units in this line item. type: decimal example: 9.95 weight: description: The weight for a single unit of this line item. type: decimal example: 0.235 required: - coo - currency - description - origin_description - quantity - value - weight line-item-compliance: type: object description: Additional compliance elements for the line item. properties: cpsc: type: object description: Consumer Product Safety Commission (US) - either the product details or a `disclaim` must be provided. properties: product_id: type: - string - 'null' description: The product id that is used in the CPSC Registry. default: null pattern: ^[A-Za-z0-9./_-]+$ maxLength: 19 product_version: type: - string - 'null' description: The product id certificate version used in the CPSC Registry. default: null pattern: ^[A-Za-z0-9./_-]+$ maxLength: 19 certifier_id: type: - string - 'null' description: The certifier id for the product registry (LPCO number). pattern: ^[A-Za-z0-9./_-]+$ maxLength: 23 default: null disclaim: type: - object - 'null' description: A disclaim is required if you don't provide the `product_id`, `product_version`, and `certifier_id`. default: null properties: code: type: string description: Disclaim code enum: - A - B iuc: type: string description: IUC minLength: 7 maxLength: 7 iuc_description: type: string description: IUC description maxLength: 64 required: - code - iuc - iuc_description manifest: type: object properties: carrier: description: The carrier delivering the overpacks to the warehouse. type: string maxLength: 20 example: DHL Express created: description: The date and time the manifest was created. type: string format: datetime example: '2024-05-27 15:43:03' readOnly: true entry_point: description: The drop off location for the overpacks. Inherited from the overpacks used to create the manifest. type: string readOnly: true example: TEST01 id: description: The manifest ID. type: integer example: 1002329 readOnly: true mawb_id: description: The ID for the Master Airway Bill this manifest is attached to. Not immediately available after creation. type: integer default: null example: 1229 readOnly: true overpack_details: description: A list of the overpacks and their details that are part of this manifest. Only available when creating and requesting a single manifest. type: array deprecated: true readOnly: true items: $ref: '#/definitions/Overpack' total_shipments: description: Total number of shipments in the manifest. This may show as null while the manifest is being created in the background. type: integer readOnly: true example: 432 tracking_number: type: string description: The tracking number for the overpacks being delivered to the warehouse. maxLength: 40 example: '9410293108' warehouse_no: type: string description: An 11 or 12 character string for internal reference. It may not be immediately available after creating a manifest. example: '753906563638' readOnly: true additionalProperties: false manifest-item: type: object properties: carrier: description: The carrier delivering the overpacks to the warehouse. type: string maxLength: 20 example: DHL Express created: description: The date and time the manifest was created. type: string format: datetime example: '2024-05-27 15:43:03' readOnly: true entry_point: description: The drop off location for the overpacks. Inherited from the overpacks used to create the manifest. type: string example: TEST01 id: description: The manifest ID. type: integer example: 1002329 readOnly: true mawb_id: description: The ID for the Master Airway Bill this manifest is attached to. Not immediately available after creation. type: integer default: null example: 1229 readOnly: true total_overpacks: description: Total number of overpacks in the manifest. Only viewable while searching. type: integer example: 21 readOnly: true total_shipments: description: Total number of shipments in the manifest. Set by system. This may show as null while the manifest is being created in the background. type: integer example: 432 readOnly: true tracking_number: type: string description: The tracking number for the overpacks being delivered to the warehouse. maxLength: 40 example: '9410293108' warehouse_no: type: string description: An 11 or 12 character string for internal reference. It may not be immediately available after creating a manifest. example: '753906563638' readOnly: true additionalProperties: false message: type: object properties: author: description: The creator of the message. Can be either "user" or "operator". type: string example: user readOnly: true body: description: The content body of the message. type: string maxLength: 200 example: Please handle with care created: description: The UTC date and time the message was created. type: string example: '2024-06-20 10:11:12' readOnly: true id: description: The unique ID for this message. type: integer example: 40119 readOnly: true not-found: type: object summary: Not Found description: Object not found or not owned by the user properties: code: description: Error code. Refer to the list of [Errors](/#tag/Errors). type: integer message: description: Error message explaining the code. type: string status: type: string enum: - error example: error errors: description: Duplicate of the error message type: array items: type: string order: type: object properties: consignee: $ref: '#/definitions/Consignee' consignor: $ref: '#/definitions/Consignor' created: description: The date and time the order was created in a third party shop if provided. Otherwise, the date and time the order was created in BoxC. This property is optional and immutable. type: string example: '2024-06-17 15:43:03' format: datetime exception_on_failure: type: boolean description: If true then the order will be created and placed in the "Exception" state when there are address or routing errors. default: false example: false writeOnly: true from: $ref: '#/definitions/From' fulfillments: type: array readOnly: true items: $ref: '#/definitions/Fulfillment' gift_message: type: string default: null description: An optional message to be included on the packing slip if requested. ``` packing_slip ``` must be true. maxLength: 128 example: Thanks for the laughs. -Sansa id: type: integer description: The order ID example: 1029210 readOnly: true ignore_bad_address: type: boolean description: Ignore shipping address verification errors. Setting this to true automatically declines insurance coverage unless the shipping address was valid, in which case the system will change this back to false. BoxC Priority addresses can't be ignored. default: false example: false insurance: type: boolean description: Adds more insurance to shipments for a fee based on a percentage of the total value (including shipping cost) of the items in the fulfillment. By default shipments include insurance that covers up to $30 in total value even when insurance is false. Insurance is not available for the BoxC Post service and some accounts. default: false example: false line_items: description: An array of line items belonging to this order. Not all properties are present when searching. type: array items: $ref: '#/definitions/OrderLineItem' packing_slip: type: boolean description: Whether or not this order requires a packing slip for each fulfillment for an additional fee. default: false example: true partial_fulfillment: type: boolean description: Whether or not this order should be fulfilled partially. If true, the warehouse will fulfill line items as their products arrive in the event there is insufficient quantity. This property can't be changed for orders that have already been partially fulfilled. example: false placed_at: description: The date and time (UTC) the order was created in the BoxC system. type: string example: '2024-06-17 15:43:03' format: datetime readOnly: true products: type: integer description: The total number of unique products in this order. example: 2 readOnly: true quantity: type: integer description: The total number of items in this order. example: 3 readOnly: true service: type: string description: The type of shipping service you want to use for this shipment. Not all services exist to all countries. If the selected service does not exist, the service will automatically be downgraded to the next available level of service. default: BoxC Parcel example: BoxC Priority shop: type: object description: Information about the shop this order is linked to. Required. This object is immutable. properties: id: type: string description: The shop ID. example: my-shop name: type: string description: A user defined shop name. maxLength: 32 example: Appleseeds readOnly: true order_id: type: string description: The shop order ID if available. Not required. You must provide this for the system to push tracking information to the third party shop. Must be unique for the shop. maxLength: 32 example: '30338272' default: null type: type: string description: The shop type. example: BoxC readOnly: true required: - id signature_confirmation: type: boolean description: Request signature confirmation from the recipient upon delivery. Not available for all services or routes. An additional fee may apply. default: false example: false status: type: string description: The order's current status. You may place an order in Holding to prevent fulfillment or Processing to fulfill the order. enum: - Holding - Processing example: Processing terms: description: The [Incoterms](https://en.wikipedia.org/wiki/Incoterms) for this shipment that affects which routes are available. If terms is not provided then the system will pick DDU or DDP if DDU is not available. DDP shipments will include tax and duty. type: string enum: - DAP - DDU - DDP default: DDU example: DDU to: $ref: '#/definitions/To' warehouse: type: object writeOnly: true description: Declare the warehouse where you want this order fulfilled. It will not be fulfilled until sufficient quantity exists at the specified warehouse. View the [Warehouses resource](/#tag/Warehouses) for a list. properties: id: type: string description: The warehouse ID. default: null example: WH0SZ001 required: - id wholesale: type: boolean description: Indicates this order is wholesale. default: false example: true required: - shop - line_items - service - consignor - to order-line-item: type: object properties: dg_code: description: The Dangerous Goods code for the product if applicable. type: string default: null example: null readOnly: true fulfilled: description: Whether or not this line item was fulfilled. type: boolean default: false example: false readOnly: true fulfillment_id: description: The fulfillment ID created to fulfill this line item. type: integer example: 123456 readOnly: true hs_code: description: The HS code for the line item if applicable. type: string default: null example: null readOnly: true name: description: The product name. type: string example: XL T-Shirt readOnly: true product_id: description: The product ID. type: integer example: 1001181 readOnly: true quantity: description: The product quantity that needs to be fulfilled. type: integer maximum: 9999 minimum: 1 example: 1 sku: description: The product SKU belonging to the order's shop. type: string example: '92820183446' minLength: 3 maxLength: 32 pattern: A-Za-z0-9-_\s/ sold_for: description: Allows the user to override the product's retail value in case the line item was sold for a different price. This property represents the total value for the line item. type: decimal default: null example: 9.95 required: - quantity - sku overpack: type: object properties: carrier: description: The final mile carrier for this overpack inherited from the shipments. type: string example: USPS readOnly: true contains_dg: description: Indicates the overpack contains a shipment with a dangerous good. type: boolean example: true readOnly: true created: description: The date and time the overpack was created. type: string format: datetime example: '2024-05-17 15:43:03' readOnly: true entry_point: description: The drop off location for this overpack. See Entry Points for a list of codes. All shipments must have the same entry point. The system determines the entry point based on the shipments. type: string example: LAXI01 minLength: 3 maxLength: 3 readOnly: true exit_point: description: The exit port for this overpack determined by the system. This value is null for shipments where exit port is deemed inconsequential for the destination. type: string default: null example: LAX pattern: - A-Z minLength: 3 maxLength: 3 readOnly: true external_tracking: description: Some carriers require their own tracking numbers to be present on the overpack label. type: string default: null example: null readOnly: true maxLength: 40 height: description: The height of the overpack in cm. Required to manifest. type: integer example: 50 id: description: The ID of the overpack. type: integer example: 12091 readOnly: true length: description: The length of the overpack in cm. Required to manifest. type: integer example: 91 locked: description: Whether or not the overpack is locked. Overpacks are locked by the system when they are part of a manifest. They can't be modified once manifested. type: boolean example: false readOnly: true manifest_id: description: The ID of the manifest this overpack is linked to. type: integer example: 1010023 readOnly: true pga: description: Indicates this overpack contains sensitive materials based on the HTS code(s) and destination country. type: boolean example: false default: false readOnly: true route_heading: type: string description: Route heading. example: null readOnly: true route_subheading: type: string description: Route subheading. example: null readOnly: true service: description: The BoxC service type. All shipments inside this overpack must have the same service. The system determines the service type based on the shipments. type: string example: BoxC Parcel readOnly: true shipments: description: 'A list of shipments inside this overpack. Clients should use this to add multiple shipments at once. Only one child attribute is required to add the shipment to the overpack. The system will check for matching shipments in the following order: shipments[].id, shipments[].label_id, or shipments[].tracking_number. Only present when getting or putting a single overpack. At least one shipment is required to determine the routing logic of the overpack. Subsequent shipments'' attributes must match the first one that was added.' type: array minItems: 1 items: type: object properties: id: description: The shipment ID. type: integer example: 1212 label_id: description: The label ID. type: integer example: 781028 tracking_number: type: string description: The shipment's tracking number. example: '9261299991753900000290' maxLength: 40 error: type: string description: Error message only present when a shipment can't be assigned to an overpack because of a mismatch of attributes. example: Can't mix shipments with different terms readOnly: true additionalProperties: false terms: description: The shipping terms for this overpack inherited from the shipments. All shipments in the overpack must have the same terms. type: string example: null readOnly: true total_shipments: description: The total number of shipments in the overpack. Only present when getting a list of overpacks. type: integer example: 432 minimum: 0 readOnly: true type86: description: Indicates the overpack contains only Type 86 shipments. This will be false for most clients. type: boolean example: false readOnly: true deprecated: true weight: description: The weight of the overpack in KG rounded to 1 significant digit after the decimal point. Required to manifest. type: decimal example: 87.5 width: description: The width of the overpack in cm. Required to manifest. type: integer example: 30 required: - shipments overpack-list: type: object properties: carrier: description: The final mile carrier for this overpack inherited from the shipments. type: string format: string example: USPS readOnly: true contains_dg: description: Indicates the overpack contains a shipment with a dangerous good. type: boolean example: true readOnly: true created: description: The date and time the overpack was created. type: string format: datetime example: '2024-05-17 15:43:03' readOnly: true entry_point: description: The drop off location for this overpack. See Entry Points for a list of codes. All shipments must have the same entry point. The system determines the entry point based on the shipments. type: string example: LAXI01 readOnly: true exit_point: description: The exit port for this shipment determined by the system. This value is null for shipments where exit port is deemed inconsequential for the destination. type: string default: null example: LAX readOnly: true external_tracking: description: Some carriers require their own tracking numbers to be present on the overpack label. type: string default: null example: null readOnly: true height: description: The height of the overpack in cm. type: integer example: '50' id: description: The ID of the overpack. type: integer example: 12091 readOnly: true length: description: The length of the shipment in cm. type: integer example: 91 locked: description: Whether or not the overpack is locked. Overpacks are locked by the system when they are part of a manifest. They can't be modified once manifested. type: boolean example: false readOnly: true manifest_id: description: The ID of the manifest this overpack is linked to. type: integer example: 1010023 readOnly: true pga: description: Indicates this overpack contains sensitive materials based on the HTS code(s) and destination country. type: boolean example: false default: false readOnly: true route_heading: type: string description: Route heading. readOnly: true example: DHLeC route_subheading: type: string description: Route subheading. readOnly: true example: LAX - MAX service: description: The BoxC service type. All shipments inside this overpack must have the same service. The system determines the service type based on the shipments. type: string example: BoxC Parcel readOnly: true terms: description: The shipping terms for this overpack inherited from the shipments. All shipments in the overpack must have the same terms. type: string example: null readOnly: true total_shipments: description: The total number of shipments in the overpack. Only present when getting a list of overpacks. type: integer example: 432 readOnly: true type86: description: Indicates the overpack contains only Type 86 shipments. This will be false for most clients. type: boolean example: false deprecated: true readOnly: true weight: description: The weight of the overpack in KG rounded to 1 significant digit after the decimal point. Required to manifest. type: decimal example: 87.5 width: description: The width of the overpack in cm. type: integer example: 30 package: type: object title: Package properties: contents: description: Contents in this package. type: array minItems: 0 default: [] items: $ref: '#/definitions/PackageContents' height: description: The height of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 example: 1 length: description: The length of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 example: 15 weight: description: The weight of the package in kg. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 example: 15 width: description: The width of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 example: 10 required: - height - length - weight - width package-contents: type: object title: PackageContents properties: description: description: A description of this item. type: string minLength: 3 maxLength: 64 example: Dayman figurines value: description: The total value of this item. type: decimal exclusiveMinimum: 0 example: 200.25 quantity: description: The number of units of this item. type: integer exclusiveMinimum: 0 example: 10 required: - description - value - quantity package-estimate: type: object title: Package properties: height: description: The height of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 example: 1 length: description: The length of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 example: 15 weight: description: The weight of the package in kg. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 example: 15 width: description: The width of the package in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 example: 10 required: - height - length - weight - width payment-required: description: Payment Required content: application/json: schema: type: object summary: Payment Required description: There are insufficient funds available for this resource properties: code: description: Error code. Refer to the list of [Errors](/#tag/Errors). type: integer message: description: Error message explaining the code. type: string status: type: string enum: - error example: error errors: description: Duplicate of the error message type: array items: type: string examples: paymentRequired: summary: Payment Required description: Insufficient funds value: code: 1080 message: Insufficient funds errors: - Insufficient funds product: type: object description: Information about the warehouse the inbound shipment is being sent to. Only the id is required when creating a shipment. View the Warehouses resource for a list. properties: backordered: description: The quantity that's backordered for this product. type: integer example: 43 readOnly: true barcode: description: The barcode for this product such as UPC, EAN, ISBN, etc. Defaults to the product ID if one isn't provided. type: string|null maxLength: 32 default: null example: '4011200296908' coo: description: The country of origin or where the product was manufactured in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format for Customs clearance. type: string maxLength: 2 minLength: 2 example: CN cost: description: The product cost value in USD. Important for insurance claims. type: decimal default: 0 example: 2.25 created: description: The date and time the shipment was created. type: string example: '2024-06-20 10:11:12' readOnly: true description: description: The product description for reference. type: string maxLength: 64 example: 100% Cotton Shirt dg_code: description: A code that identifies dangerous goods. Required if shipping lithium batteries, ORM-D, or other dangerous goods. Refer to [this page](/#tag/DangerousGoods) for a list of codes and further information. type: string example: '0966' height: description: The product height in CM. type: integer example: 5 readOnly: true hs_codes: description: An array of objects containing HS codes used for Customs clearance in different countries. Some countries or services require an HS code for import and/or export. Remove countries' HS codes from the product by omitting the objects you no longer want associated in an update request. Remove all HS codes by passing an empty array. type: array items: type: object properties: country: type: string description: Country code pattern: '[A-Z]{2}' example: US hs_code: type: string description: The country's HTS Code for the product pattern: '[0-9]{8,12}' example: 3109165102 required: - country - hs_code example: - country: US hs_code: '3109165102' - country: CN hs_code: '0302410090' id: description: The product ID. Set by the system. type: integer example: 20191 readOnly: true length: description: The product length in CM. Set by the system. type: integer example: 12 readOnly: true local_descriptions: description: A list of product descriptions in different languages. Only used to update the description in a warehouse's local language. It will update all descriptions with a matching language_code. Required if the product is actually inventoried at warehouses. type: array writeOnly: true items: type: object properties: description: description: The product description in the language indicated by language_code. type: string maxLength: 64 language_code: description: The local language code for the warehouse in ISO 639-1 format. type: string required: - description - language_code example: - description: 100% Cotton T-Shirt language_code: en - description: 毛衣 language_code: zh name: description: The product name to help identify the product. type: string maxLength: 64 minLength: 3 example: XL Pink T-Shirt quantity: description: The quantity on hand across all warehouses. type: integer example: 544 readOnly: true supplier: description: The product supplier or manufacturer. This is known as the Manufacturer Identification code (MID) in the US. It's required for some countries based on the origin and destination. type: string example: 212312311 maxLength: 32 default: null url: description: A link to the product on your marketplace used for customs clearance. type: string maxLength: 128 format: uri example: https://example.com/product/1234 value: description: The product retail value in USD. type: decimal example: 19.99 weight: description: The product weight in KG. type: decimal example: 0.325 readOnly: true width: description: The product width in CM. type: integer example: 10 readOnly: true required: - coo - description - name - value product-warehouse: type: object description: Information about the product and warehouse the inbound shipment is being sent to. properties: backordered: description: The quantity that's backordered for this product. type: integer example: 43 readOnly: true barcode: description: The barcode for this product such as UPC, EAN, ISBN, etc. type: string maxLength: 32 default: Product ID example: 4011200296908 coo: description: The country of origin or where the product was manufactured in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format for Customs type: string maxLength: 2 minLength: 2 example: CN cost: description: The product cost value in USD. Important for insurance claims. type: decimal default: 0 example: 2.25 created: description: The date and time the shipment was created. type: string example: '2024-06-20 10:11:12' readOnly: true description: description: The product description for reference. type: string maxLength: 64 example: 100% Cotton Shirt dg_code: description: A code that identifies dangerous goods. Required if shipping lithium batteries, ORM-D, or other dangerous goods. Refer to [this page](/#tag/DangerousGoods) for a list of codes and further information. type: string example: '0966' height: description: The product height in CM. type: integer example: 5 readOnly: true hs_codes: description: An array of objects containing HS codes used for Customs clearance in different countries. Some countries or services require an HS code for import and/or export. Optional. Remove countries' HS codes from the product by omitting the objects you no longer want associated in an update request. Remove all HS codes by passing an empty array. type: array items: type: object properties: country: type: string example: US hs_code: type: string example: 3109165102 required: - country - hs_code example: - country: US hs_code: '3109165102' - country: CN hs_code: '0302410090' id: description: The product ID. type: integer example: 20191 readOnly: true is_packaging: description: Indicates if this product is using for packaging at the warehouse. Immutable. Optional. type: boolean default: false example: false length: description: The product length in CM. type: integer example: 12 readOnly: true name: description: The product name to help identify the product. type: string maxLength: 64 minLength: 3 example: XL Pink T-Shirt quantity: description: The quantity on hand across all warehouses. type: integer example: 544 readOnly: true skus: description: An array of SKUs that reference this product. type: array items: $ref: '#/definitions/Sku' example: - active: true shop_id: my-shop sku: SK10291 - active: false shop_id: my-shop sku: 08X092 supplier: type: string maxLength: 32 example: US1234567890 default: null value: description: The product retail value in USD. type: decimal example: 19.99 warehouses: description: An array of warehouses and their inventory for this product. Only present when retrieving a single product. type: array items: $ref: '#/definitions/Warehouse' example: - description: 毛衣 entry_point: HKG101 id: WH0HK001 language: Chinese language_code: zh quantity: 102 - description: 毛衣 entry_point: SZX001 id: WH0SZ001 language: Chinese language_code: zh quantity: 0 weight: description: The product weight in KG. type: decimal example: 0.325 readOnly: true width: description: The product width in CM. type: integer example: 10 readOnly: true required: - coo - description - name - skus - value rate-limit: description: Too Many Requests content: application/json: schema: type: object summary: Too Many Requests description: Error for too many requests in a given time frame. See [Rate Limits](/#tag/RateLimit) for more information. properties: code: description: Error code. Refer to the list of [Errors](/#tag/Errors). type: integer message: description: Error message explaining the code. type: string status: type: string enum: - error example: error errors: description: Displays processing error. type: array minItems: 1 maxItems: 1 items: type: string examples: rateLimit: summary: Too Many Requests description: Too many requests. Please wait before trying again. value: code: 1015 message: Too many requests. Please wait before trying again. errors: - Too many requests. Please wait before trying again. reshipment: type: object properties: contents: description: A description of the contents in this reshipment for Customs requirements. type: string format: string maxLength: 60 default: null example: Leggings created: description: The UTC date and time the reshipment was created. type: string example: '2024-06-27 11:32:18' format: datetime readOnly: true estimated_reship_fee: description: An estimated price in USD for this reshipment including the cost of the label and packaging material. type: decimal default: 0 example: 14.2 id: description: The unique ID for this reshipment. type: integer example: 13489 reship_fee: description: The fee in USD for this reshipment including the cost of the label and packaging material. type: decimal default: 0 example: 14.37 returns: type: array description: A list of return IDs included in this reshipment. If searching for reshipments then the total number of returns will be shown instead. This property is immutable. items: type: integer example: - 12001 - 12002 service: description: The carrier used for this reshipment. type: string default: null example: USPS status: type: string enum: - Pending - Declined - Approved description: The status of this reshipment. example: Approved to: $ref: '#/definitions/To' tracking_number: type: string description: The tracking number for this reshipment. default: null example: '9261299997140101431920' value: type: decimal description: The total value of the contents in this reshipment for Customs requirements. example: 29.95 weight: description: The measured actual weight of this reshipment in KG. type: decimal default: 0 example: 0.791 required: - to - contents - value - returns additionalProperties: false return: type: object properties: created: description: The UTC date and time the return was processed at a facility. type: string example: '2024-06-27 11:32:18' format: datetime readOnly: true id: description: The unique ID for this return. type: integer example: 13489 readOnly: true images: type: array description: A list of images taken for this return. Only present when retrieving a single return. Images are removed when the return is discarded. readOnly: true items: string example: - https://api.boxc.com/i/32e186166912f18072645e793933904a115f23ce3d33108853640d1d3f94c6b6.jpg - https://api.boxc.com/i/032b960ff67c0fe830e78cb60a2a1b09df18c216a15cacddfbcbfaed33da473e.jpg messages: type: array description: A list of message objects left by the user or operater for this return. Messages are sorted by created in descending order. If searching, the number of messages will be returned instead. See message for details about each property. items: messages: $ref: '#/definitions/Message' process_fee: description: The fee in USD for processing this return. type: decimal example: 1 readOnly: true reshipment_id: description: The unique ID for this return's reshipment if available. type: integer default: null example: 102910 readOnly: true rma_number: type: string description: The return merchandise authorization (RMA) for this return if available. default: null example: RMA10293021 readOnly: true status: type: string enum: - Processed - Verifying - Verified - Reshipping - Reshipped description: The status of the return. example: Processed tracking_number: type: string description: The tracking number that was used by the sender for this return. example: '9261299997140101431920' readOnly: true verify_fee: description: The fee in USD for verifying this return. Only applies to returns that were verified. type: decimal default: 0 example: 0 readOnly: true warehouse: description: Information about the warehouse the return was processed at. type: object properties: id: description: The warehouse id type: string example: WH0CVG01 readOnly: true weight: description: The measured weight of this return in KG. type: decimal default: 0 example: 0.128 readOnly: true service: type: object description: A list of services and their estimated price and transit time. Set by the system. If an empty array is returned then there are currently no services available for the given route. properties: carrier: description: The last mile carrier the shipment will use for delivery. type: string example: USPS chargeable_weight: description: The greater of the gross weight and volumetric weight. type: decimal example: 0.412 cost: description: The estimated shipping cost. type: decimal example: 3.55 exit_point: description: The destination port the shipment will be transported to before last mile delivery. type: string default: null example: LAX gross_weight: description: The greater of the requested weight and minimum gross weight for the route. type: decimal example: 0.25 insurance: type: object description: Insurance details for this service. properties: coverage: type: decimal description: The dollar amount covered by the insurance policy. example: 30 fee: type: decimal description: The cost of coverage if insured. example: 0 service: type: string description: Service name example: BoxC Priority surcharge: description: Additional cost for this shipment based on the route and chargeable weight. type: decimal example: 0.75 terms: type: array description: Acceptable incoterms for this route. items: type: string example: - DAP - DDU - DDP total_cost: description: The total estimated shipping cost including applicable fees. type: decimal example: 3.55 transit_min: type: integer description: Estimated minimum transit time in days. example: 5 transit_max: type: integer description: Estimated maximum transit time in days. example: 10 volumetric_weight: description: The volumetric weight based on the requested dimensions and route's divisor. type: decimal example: 0.412 service-unavailable: type: object summary: Service Unavailable description: The server cannot handle the request (because it is overloaded or down for maintenance). Generally, this is a temporary state. properties: code: description: Error code. Refer to the list of [Errors](/#tag/Errors). type: integer message: description: Error message explaining the code. type: string status: type: string enum: - error example: error errors: description: Duplicate of the error message type: array items: type: string settings: type: object description: Default settings for the shop. properties: delay_processing: type: integer description: 'The number of hours an order should remain unprocessed in the system before packing. Orders will be processed if their created value plus the shop''s delay_processing value is greater than the current time. Max: 240.' example: 240 default: 0 shipment: description: Shipment type: object properties: carrier: description: This grants clients the ability to select the last mile carrier when creating and updating a shipment. An error is returned if no routes exist given the combination of parameters provided by the client. For example, the chosen carrier might be available for some services, weight ranges, exit points, countries, etc. but not necessarily all at once. type: string default: null example: DeutschePost carrier_params: type: - object - 'null' default: null description: The carrier parameters for customizing a request. Supported parameters can be found on the [Carrier Parameters](/#tag/CarrierParameters) page. example: ppi_number: PMK9999 claim_url: description: The claim URL if this shipment is covered by insurance. Only available when the shipment is eligible for a claim. type: - string - 'null' default: null example: https://www.xcover.com/en/account/claims/fnol?bookingID=AAA-AAA-AAINS readOnly: true cod: description: Request Cash on Delivery from the recipient. Not all routes support this option. type: object properties: amount: description: The amount to collect in the destination currency. type: decimal example: 13.37 minimum: 0 currency: description: The currency code for the destination country. type: - string - 'null' default: null example: AUD readOnly: true comments: description: Comments for the bottom of the label. type: array maxItems: 3 maxLength: 80 items: type: string example: 'SKU #10292301' compliance: type: - object - 'null' writeOnly: true description: Toggle compliance related flags. This is available for qualified parties only. default: address: true classify: true descriptions: true denied_party: true pga: true example: address: true classify: true descriptions: true denied_party: true pga: true properties: address: type: boolean description: Toggles most address formatting and validation, and third party verification if applicable. default: true classify: type: boolean description: Toggles HS Code and description classification for line items. Required for `pga`. default: true descriptions: type: boolean description: Toggles description validation checks for line items. default: true denied_party: type: boolean description: Toggles denied party screening for the consignee. default: true pga: type: boolean description: Toggles screening line items for goods that are PGA. Requires `classify`. default: true consignee: $ref: '#/definitions/Consignee' consignor: $ref: '#/definitions/Consignor' create_label: description: Tells the API to create the shipment and label in one request. type: boolean default: false example: true writeOnly: true created: description: The date and time the shipment was created. type: string example: '2024-11-17 15:43:03' readOnly: true credentials_id: description: The Credential ID to use for this shipment. Refer to [Credentials](/#tag/Credentials) for details. type: - integer - 'null' default: null currency: description: The ISO 4217 currency code for payment. Useful for paying from a separate account balance other than USD. Costs and fees will be shown in the requested currency. type: string default: USD example: USD enum: - AUD - CAD - EUR - GBP - HKD - JPY - MYR - USD duty: description: The total duty owed/paid for this shipment. type: decimal readOnly: true example: 2.23 entry_point: description: The drop off location for this shipment. Determines the shipping rates and routing. See [Entry Points](/#tag/EntryPoints) for a list of codes. type: string example: TEST01 errors: description: This property is returned if and only if create_label is true and there was an error attempting to create the label. type: object readOnly: true properties: code: description: Code type: integer example: 1080 http_status: description: HTTP Status Code type: integer example: 402 message: description: Message type: string example: Insufficient funds status: description: Status - Success or Error type: string example: error events: description: The tracking history for this shipment in descending order. type: array readOnly: true items: $ref: '#/definitions/Event' exit_point: description: The requested IATA port the shipment should be transported to for last mile delivery. Routing will select the port to use if not provided. If a port is provided but not supported then a "No routes found" error is returned. type: string default: null example: LAX freight_charge: description: Declare the total cost of freight for this shipment. type: object properties: amount: description: The total amount of the freight. type: decimal example: 13.37 minimum: 0 currency: description: The currency code for the freight amount. pattern: ^[A-Z]{3}$ type: string example: MXN from: $ref: '#/definitions/From' height: description: The height of the shipment in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 default: 1 example: 1.5 id: description: The ID of the shipment. type: integer example: 42001 readOnly: true ignore_bad_address: description: Ignore shipping address verification errors. Setting this to true automatically declines insurance coverage unless the shipping address was valid, in which case the system will change this back to false. BoxC Priority addresses can't be ignored. type: boolean default: false example: false images: $ref: '#/definitions/ShipmentImages' insurance: description: Adds more insurance to the shipment for a fee based on a percentage of the total value (including shipping cost) of the items. By default shipments include insurance that covers up to $30 in total value even when insurance is false. Insurance is not available for some services. type: boolean default: false example: false insured_value: description: The total value (USD) of the shipment that can be claimed. type: decimal example: 35.95 readOnly: true irregular: description: Indicates this shipment was packaged in irregular shaped polybag or soft packaging to assist in calculating the volumetric weight. type: boolean default: false example: false is_return: description: Indicates this shipment is a return and will select the correct carrier product if any are available. type: boolean default: false example: false label: description: The active label for this shipment. Only available when listing shipments. readOnly: true type: object allOf: - $ref: '#/definitions/Label' labels: description: A list of all labels created for this shipment. Only present when requesting a single shipment. readOnly: true type: array items: $ref: '#/definitions/Label' length: description: The length of the shipment in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 default: 15 example: 15 line_items: description: Contents of the shipment. type: array items: $ref: '#/definitions/LineItem' nature_type: type: - string - 'null' description: The nature type of the shipment. This is only relevant for postal shipments. default: null enum: - '1' - '2' - '3' - '4' - '5' - '6' - '7' - '8' - '9' - '11' - '12' - '21' - '31' - '32' - '61' - '62' - '91' - '99' - '111' - '212' - '213' - '214' - '390' - '391' - '991' - '999' example: '11' order_number: description: This can be used as a searchable reference for this shipment. Zonos customers should place their Order ID here. It does not have to be a unique value. type: string maxLength: 40 default: null example: 23018721-ABC overpack_id: description: The overpack this shipment is assigned to. Set to null when removing a shipment from an overpack. type: integer deprecated: true default: null example: 1291028 packages: description: Packages for multi-package shipments. Each package will create a label. type: array writeOnly: true items: $ref: '#/definitions/Package' pga: description: Indicates this shipment contains sensitive materials based on the HTS code(s) and destination country. type: boolean example: false default: false readOnly: true service: description: 'The type of shipping service you want to use for this shipment. Some services include: BoxC Post, BoxC Parcel, BoxC Plus, BoxC Priority. More services are available and can be found in [Carrier Services](/#tag/Carrier-Services).' type: string default: BoxC Parcel example: BoxC Priority signature_confirmation: description: Request signature confirmation from the recipient upon delivery. Not available for all services or routes. An additional fee may apply. type: boolean default: false example: false tax: description: The total tax owed/paid for this shipment in USD. Applies to DDP shipments. Read only. type: decimal readOnly: true example: 10.15 terms: description: The [Incoterms](https://en.wikipedia.org/wiki/Incoterms) for this shipment that affects which routes are available. If terms is not provided then the system will pick DDU or DDP if DDU is not available. DDP shipments will include tax and duty. type: string enum: - DAP - DDU - DDP default: DDU example: DDU test: description: Whether or not this is a test shipment that will generate test labels. Default is false. This property is [immutable](https://en.wikipedia.org/wiki/Immutable_object). type: boolean default: false example: false to: $ref: '#/definitions/To' total_cost: description: The total shipping cost in USD. type: decimal example: 3.58 readOnly: true tracking_number: description: Qualified parties may use their own tracking number for the shipment. The `carrier` must be one of "AIR", "UPU", or "MKT". writeOnly: true type: string pattern: '[A-Za-z0-9]' maxLength: 40 minLength: 8 updated: description: The date and time the shipment was last updated. type: string example: '2024-11-20 02:32:48' readOnly: true volumetric_weight: description: The volumetric / dimensional weight of the shipment based on the route's divisor. type: decimal example: 0.088 readOnly: true weight: description: The weight of the shipment in KG. type: decimal example: 0.088 exclusiveMinimum: 0 exclusiveMaximum: 10000 width: description: The width of the shipment in cm. type: decimal exclusiveMinimum: 0 exclusiveMaximum: 1000 default: 10 example: 8 zonos_customer_id: description: Optionally provide a Zonos Customer ID. This overrides the Zonos Customer ID in account settings. type: string default: null example: Z123456789 required: - line_items - service - entry_point - consignor - to - weight shipment-images: description: Lists URLs of images taken during transit and categorized by type of photo. URLs expire after a period of time so refer to the `expires` query parameter. type: object readOnly: true properties: pod: type: array default: [] readOnly: true example: - https://storage.googleapis.com/boxc_shipments_us/images/pod/i67e4226fb291a5.123123123.jpeg?fingerprint=06d7de3c7c8c0f5c&expires=1758556271 items: type: string scans: type: array default: [] readOnly: true example: - https://storage.googleapis.com/boxc_shipments_us/images/scans/i67e4226fb291a6.1231232131.jpeg?fingerprint=15d7de3c7c8c0f5c&expires=1758556271 items: type: string shipment-process-request: type: object properties: shipment: type: object properties: datetime: description: Datetime type: string example: '2024-06-02 11:12:13' fulfillment_id: description: Fulfillment id type: integer example: null height: description: The height of the shipment in cm. type: decimal default: 1 example: '1.00' length: description: The length of the shipment in cm. type: decimal default: 15 example: 15 weight: description: The weight of the shipment in KG. type: decimal example: 0.088 width: description: The width of the shipment in cm. type: decimal default: 10 example: 8 irregular: description: Indicates this shipment was packaged in irregular shaped polybag or soft packaging to assist in calculating the volumetric weight. type: boolean default: false example: false additionalProperties: false shop: allOf: - type: object properties: id: type: string description: The shop ID. This property is immutable and must be unique. minLength: 3 maxLength: 32 pattern: A-Za-z0-9-_ example: my-shop required: - id - name - $ref: '#/definitions/ShopPut' shop-put: type: object properties: active: type: boolean description: Whether or not the shop is active. This only applies to third party shops. An inactive third party shop will no longer have its orders imported into the system. example: true default: true created: type: string description: The date and time the shop was created. example: '2024-06-17 13:22:44' readOnly: true name: type: string description: The shop name. minLength: 3 maxLength: 32 example: Appleseeds settings: $ref: '#/definitions/Settings' type: type: string description: The type of shop. Always "BoxC". example: BoxC deprecated: true enum: - BoxC sku: type: object properties: active: description: Whether or not this SKU is active. Orders with an inactive SKU can't be created. type: boolean default: true example: true shop_id: description: The shop ID associated with this SKU type: string example: my-shop sku: description: The SKU identifier type: string minLength: 3 maxLength: 32 pattern: A-Za-z0-9-_ / example: SK10291 required: - shop_id - sku subscription: type: object description: Subscription. properties: amount: description: The amount charged each interval. type: decimal example: 29.95 application: description: The name of the application that created the subscription. type: string example: Returns By BoxC cancelled_at: description: The UTC date and time the subscription was cancelled. type: datetime default: null example: null created: description: The UTC date and time the subscription was created. type: datetime default: null example: '2024-07-18 14:10:01' currency: description: The currency code for the amount. Always "USD". type: string default: USD example: USD current_period_end: description: The UTC date and time the subscription ends for this interval. type: datetime example: '2024-08-18 23:59:59' current_period_start: description: The UTC date and time the subscription started for this interval. type: datetime example: '2024-07-18 14:10:01' id: description: The unique ID of the subscription. type: integer example: sub_578d2a6bb75be interval: description: How often the subscription is renewed and the user is charged. Always "monthly". type: string example: monthly name: description: The name of the subscription set by the application. type: string example: RBB Basic Plan status: description: The status of the subscription. type: string enum: - active - cancelled example: active to: description: The recipient's shipping address. This may or may not be the same as the consignee. Countries have different formatting rules and element requirements for addresses. title: ShippingAddress type: object properties: company_name: description: The company name. type: string maxLength: 40 default: null example: null name: description: The recipient's name. type: string maxLength: 40 example: John Smith phone: description: The recipient's phone number. Conditional. type: string default: null maxLength: 20 format: phone example: 555-123-4562 email: description: The recipient's e-mail address. Conditional. type: string default: null maxLength: 64 format: email example: john@example.com street1: description: The recipient's street address. type: string maxLength: 50 minLength: 1 example: 108 N WESTGATE WAY street2: description: Additional space for the recipient's street address. type: string maxLength: 50 default: null example: null city: description: The recipient's city. type: string maxLength: 40 example: WYLIE province: description: The recipient's province or state. Conditional. type: string maxLength: 40 default: null example: TX postal_code: description: The recipient's postal code or ZIP Code. Conditional. type: string maxLength: 10 default: null example: '75098' country: description: The recipient's country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. type: string pattern: - A-Z maxLength: 2 minLength: 2 example: US required: - name - street1 - city - country track: type: object properties: track: type: object properties: carrier: description: The last mile carrier code for the shipment. type: string format: string default: null example: DHLeC created: description: The date and time the shipment was created. type: string example: '2024-06-30T17:14:10+00:00' readOnly: true destination: type: object $ref: '#/definitions/Destination' entry_point: description: The shipment origin code. type: string example: HKG101 events: description: A list of tracking events sorted in descending order chronologically. type: array items: $ref: '#/definitions/Event' has_images: description: Indicates this shipment has images. type: boolean readOnly: true example: true images: $ref: '#/definitions/ShipmentImages' order_number: description: The shipment order number. type: string maxLength: 40 default: null example: ABC1234-583 service: description: The shipment service name. type: string example: BoxC Parcel shipment_id: description: The shipment ID. type: integer example: 10002312 status: description: The tracking status of the shipment. type: string example: En Route tracking_number: type: string description: The shipment tracking number. example: '9261290198179000000172' additionalProperties: false track-add: type: object properties: events: type: array description: An array of tracking events to inject. minItems: 1 maxItems: 100 items: type: object properties: carrier: description: The carrier that provided this event. type: string example: USPS readOnly: true city: description: The city the event took place in. type: string maxLength: 40 example: New York code: description: The BoxC event code. Refer to [Tracking Events](/#tag/TrackingEvents) for descriptions. type: integer example: 150 enum: - 100 - 101 - 102 - 103 - 104 - 105 - 106 - 109 - 110 - 111 - 112 - 113 - 114 - 120 - 121 - 130 - 131 - 132 - 133 - 134 - 135 - 136 - 140 - 150 - 155 country: description: The country code the event took place in. type: string maxLength: 2 minLength: 2 pattern: - A-Z example: US description: description: A description of the event. type: string example: EN ROUTE readOnly: true latitude: description: Latitude coordinate of the event. type: - number - 'null' minimum: -90 maximum: 90 default: null example: null longitude: description: Longitude coordinate of the event. type: - number - 'null' minimum: -180 maximum: 180 default: null example: null postal_code: description: The postal code the event took place in. type: string maxLength: 10 example: '10001' default: null province: description: The province the event took place in. type: string maxLength: 40 example: NY default: null time: description: The local date and time the event occurred. type: string format: datetime example: '2024-05-26 07:11:45' tracking_number: description: The tracking number for the event. type: string maxLength: 40 example: CH957707285DE required: - time - code - city - country - tracking_number required: - events unauthorized: description: Unauthorized content: application/json: schema: type: object summary: Unauthorized description: Lack of valid authentication credentials for the resource properties: code: description: Error code. Refer to the list of [Errors](/#tag/Errors). type: integer message: description: Error message explaining the code. type: string status: type: string enum: - error example: error errors: description: Displays processing error. type: array minItems: 1 maxItems: 1 items: type: string examples: accessToken: summary: Invalid access token description: Invalid access token value: code: 1005 message: Invalid access token errors: - Invalid access token user: type: object properties: address: $ref: '#/definitions/Address' balance: description: The user's current balance with BoxC in USD. A negative amount is an outstanding balance. deprecated: true type: decimal example: 1525.46 readOnly: true balances: description: A list of balances in different currencies for this user. type: object example: USD: 1201.42 CNY: 421090 readOnly: true credit_limits: description: A list of credit limits in different currencies for this user. type: object example: USD: 100000 CNY: 0 readOnly: true first_name: description: The user's first name. type: string example: Huang readOnly: true id: description: The user's ID. type: integer example: 12006 readOnly: true last_name: description: The user's last name. type: string example: Qin readOnly: true subscriptions: type: array readOnly: true items: $ref: '#/definitions/Subscription' timezone: description: The user's timezone following the format of [tz database](https://www.iana.org/time-zones). type: string default: UTC example: UTC readOnly: true additionalProperties: false validate-address: type: object properties: street1: description: The street address. type: string maxLength: 50 example: 113 INTL BROADWAY street2: description: Additional space for street address. type: string maxLength: 50 example: '' city: type: string description: The city. example: LOS ANGELES province: type: string description: The province or the state. Optional. Required for US. example: CA postal_code: type: string description: The postal code or ZIP Code. example: '91013' country: type: string description: |- The country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. Required. Allowed Values: AR, AT, AU, BE, BG, BR, CA, CH, CL, CO, CZ, DE, DK, EE, ES, FI, FR, GB, HR, HU, IE, IN, IT, JP, LT, LU, LV, MX, MY, NL, NO, NZ, PL, PR, PT, SE, SG, SI, SK, US example: US required: - street1 - city - country additionalProperties: false validated-address: type: object properties: original: type: object $ref: '#/definitions/ValidateAddress' error: type: boolean description: Whether or not there has been an error while validating the address. example: true message: type: string|null description: A message which explains the error occurred. matches: type: array description: List of postal address matches for the provided original address. items: $ref: '#/definitions/ValidatedAddressMatch' additionalProperties: false validated-address-match: type: object properties: street1: description: The street address. type: string maxLength: 50 example: 113 INTL BROADWAY street2: description: Additional space for street address. type: string maxLength: 50 example: '' city: type: string description: The city. example: LOS ANGELES province: type: string description: The province or the state. Optional. Required for US. example: CA postal_code: type: string description: The postal code or ZIP Code. example: 90210 country: type: string description: The country in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. example: US confidence: type: string description: |- Confidence value inside each match describes how accurate the match is. You can increase the confidence of an existing match by providing additional or more accurate information. LOW confidence means that the address is most probably does not exist thus, it should not be provided as an address input to any of our endpoints. MEDIUM confidence means that the address is missing some components or some parts are unconfirmed but plausible. It is usually acceptable as an address input but whether it can be used or not depends on its completeness thus, caution is advised. HIGH confidence means that there's an exact match thus, it is recommended and can be used as an address input. example: HIGH enum: - LOW - MEDIUM - HIGH verdict: type: object description: High level overview of the address validation result. properties: inputGranularity: type: string description: The various granularities that an address can have. example: PREMISE enum: - GRANULARITY_UNSPECIFIED - SUB_PREMISE - PREMISE - PREMISE_PROXIMITY - BLOCK - ROUTE - OTHER validationGranularity: type: string description: The level of granularity for the post-processed address that the API can fully validate. example: SUB_PREMISE enum: - GRANULARITY_UNSPECIFIED - SUB_PREMISE - PREMISE - PREMISE_PROXIMITY - BLOCK - ROUTE - OTHER geocodeGranularity: type: string description: How coarse or fine the geocoded location is. example: PREMISE_PROXIMITY enum: - GRANULARITY_UNSPECIFIED - SUB_PREMISE - PREMISE - PREMISE_PROXIMITY - BLOCK - ROUTE - OTHER addressComplete: type: boolean description: The post-processed address is considered complete if there are no unresolved tokens, no unexpected or missing address components. If unset, indicates that the value is false. example: true hasUnconfirmedComponents: type: boolean description: At least one address component cannot be categorized or validated. example: false hasInferredComponents: type: boolean description: At least one address component was added that wasn't in the input. example: true hasReplacedComponents: type: boolean description: At least one address component was replaced. example: false possibleNextAction: type: string description: An interpretive summary of the API response that should not be considered as a guarantee of accuracy. example: ACCEPT enum: - POSSIBLE_NEXT_ACTION_UNSPECIFIED - FIX - CONFIRM_ADD_SUBPREMISES - CONFIRM - ACCEPT hasSpellCorrectedComponents: type: boolean description: At least one address component was spell-corrected. example: true addressComponents: description: List of address components such as a street, city, or state. type: array items: type: object properties: componentName: type: object description: A wrapper for the name of the component. properties: text: type: string description: The name text. example: Main St. languageCode: type: string description: Two letter language code. example: en componentType: type: string description: The type of the address component. example: street_number confirmationLevel: type: string description: Indicates the level of certainty that the component is correct. example: CONFIRMED enum: - CONFIRMATION_LEVEL_UNSPECIFIED - CONFIRMED - UNCONFIRMED_BUT_PLAUSIBLE - UNCONFIRMED_AND_SUSPICIOUS missingComponentTypes: description: The types of components that were expected to be present in a correctly formatted mailing address but were not found in the input AND could not be inferred. type: array example: - street_address - postal_code items: type: string unconfirmedComponentTypes: description: The types of the components that are present in the addressComponents but could not be confirmed to be correct. type: array example: - subpremise - route items: type: string unresolvedTokens: description: Input that was not recognized as a valid part of an address. type: array example: - Box - '11789' items: type: string metadata: type: object description: The metadata for the post-processed address. properties: business: type: boolean description: Is the address for a business. example: false poBox: type: boolean description: Is the address a PO box. example: false residential: type: boolean description: Is the address a residence. example: true uspsData: type: object description: The USPS data for the address. properties: standardizedAddress: type: object description: USPS representation of a US address. properties: firstAddressLine: type: string description: First address line. example: 123 Main St. firm: type: string description: The firm's name. example: IBM Corp. secondAddressLine: type: string description: Second address line. example: Apt. 3B urbanization: type: string description: Puerto Rican urbanization name. example: Urbanización Valle Verde cityStateZipAddressLine: type: string description: City, state and postal code. example: 10123 city: type: string description: The address city. example: New Orleans state: type: string description: The two letter address state abbreviation. example: LA zipCode: type: string description: Postal code. example: 70112 zipCodeExtension: type: string description: 4-digit postal code extension. example: 2431 deliveryPointCode: type: string description: 2 digit delivery point code example: 12 deliveryPointCheckDigit: type: string description: The delivery point check digit example: 8 dpvConfirmation: type: string description: The possible values for DPV confirmation. example: 'Y' enum: - 'N' - D - S - 'Y' - Empty dpvFootnote: type: string description: The footnotes from delivery point validation. example: AA enum: - AA - A1 - BB - CC - C1 - N1 - M1 - M3 - P1 - P3 - F1 - G1 - U1 - PB - RR - R1 - R7 - IA - TA dpvCmra: type: string description: Is the address a Commercial Mail Receiving Agency? example: 'N' dpvVacant: type: string description: Is this a vacant address? example: 'N' dpvNoStat: type: string description: No stat addresses are ones which are not continuously occupied or addresses that the USPS does not service. example: 'N' dpvNoStatReasonCode: type: integer description: No stat type. example: 1 dpvDrop: type: string description: Flag indicates mail is delivered to a single receptable at a site. example: 'Y' dpvThrowback: type: string description: Indicates that mail is not delivered to the street address. example: 'N' dpvNonDeliveryDays: type: string description: Flag indicates mail delivery is not performed every day of the week. example: 'N' dpvNonDeliveryDaysValues: type: integer description: Integer identifying non-delivery days. example: 1 dpvNoSecureLocation: type: string description: Flag indicates door is accessible, but package will not be left due to security concerns. example: 'N' dpvPbsa: type: string description: Indicates the address was matched to PBSA record. example: 'Y' dpvEnhancedDeliveryCode: type: string description: Indicates that more than one DPV return code is valid for the address. example: D enum: - 'Y' - 'N' - S - D - R carrierRoute: type: string description: The four character carrier route code. example: R008 carrierRouteIndicator: type: string description: Carrier route rate sort indicator. example: D ewsNoMatch: type: boolean description: The delivery address is matchable, but the EWS file indicates that an exact match will be available soon. example: true postOfficeCity: type: string description: Main post office city. example: Miami postOfficeState: type: string description: Main post office state abbreviation. example: FL abbreviatedCity: type: string description: Abbreviated city. example: LA fipsCountyCode: type: string description: FIPS county code. example: 111 county: type: string description: County name example: Dade elotNumber: type: string description: Enhanced Line of Travel (eLOT) number. example: 365 elotFlag: type: string description: eLOT Ascending/Descending Flag. example: D lacsLinkReturnCode: type: string description: LACSLink return code. example: 92 lacsLinkIndicator: type: string description: LACSLink indicator. example: 'Y' enum: - 'Y' - 'N' - F - S - blank poBoxOnlyPostalCode: type: boolean description: PO Box only postal code. example: false suitelinkFootnote: type: string description: Footnotes from matching a street or highrise record to suite information. example: 0 pmbDesignator: type: string description: Private Mail Box unit designator. example: Piloto pmbNumber: type: string description: Private Mail Box number. example: 123 addressRecordType: type: string description: Type of the address record that matches the input address. example: R enum: - F - G - H - P - R - S defaultAddress: type: boolean description: Indicator that a default address was found, but more specific addresses exists. example: false errorMessage: type: string description: Error message for USPS data retrieval. example: Invalid zip code extension cassProcessed: type: boolean description: Has the request been CASS processed. example: false englishLatinAddress: type: object description: The address translated to English. properties: formattedAddress: type: string description: The post-processed address, formatted as a single-line address. example: 123 Main St. New Orleans, LA 70112-2431, US postalAddress: type: object description: Represents a postal address, such as for postal delivery. properties: revision: type: integer description: The schema revision. example: 0 regionCode: type: string description: CLDR region code of the country/region of the address. example: CH languageCode: type: string description: Two letter language code. example: en postalCode: type: string description: Postal code of the address. example: 90210 sortingCode: type: string description: Additional, country-specific, sorting code. example: CEDEX 7 administrativeArea: type: string description: Highest administrative subdivision which is used for postal addresses of a country or region. example: Barcelona locality: type: string description: Generally refers to the city or town portion of the address. example: New York sublocality: type: string description: Neighborhood, borough, or district. example: Brooklyn addressLines: type: array description: Unstructured address lines describing the lower levels of an address. example: - 123 Main St. - New Orleans - LA - 70112-2431 - US items: type: string addressComponents: description: List of address components such as a street, city, or state. type: array items: type: object properties: componentName: type: object description: A wrapper for the name of the component. properties: text: type: string description: The name text. example: Main St. languageCode: type: string description: Two letter language code. example: en componentType: type: string description: The type of the address component. example: street_number confirmationLevel: type: string description: Indicates the level of certainty that the component is correct. example: CONFIRMED enum: - CONFIRMATION_LEVEL_UNSPECIFIED - CONFIRMED - UNCONFIRMED_BUT_PLAUSIBLE - UNCONFIRMED_AND_SUSPICIOUS missingComponentTypes: description: The types of components that were expected to be present in a correctly formatted mailing address but were not found in the input AND could not be inferred. type: array example: - street_address - postal_code items: type: string unconfirmedComponentTypes: description: The types of the components that are present in the addressComponents but could not be confirmed to be correct. type: array example: - subpremise - route items: type: string unresolvedTokens: description: Input that was not recognized as a valid part of an address. type: array example: - Box - '11789' items: type: string warehouse: type: object description: Information about the warehouse the inbound shipment or is being sent to or a return was processed at. Only the ```id``` is required when creating an inbound shipment. View the [Warehouses resource](/#tag/Warehouses) for a list. properties: address: description: The warehouse address with newlines (\n). type: string example: |- Unit 5b, 102 Jinfanghua Ecommerce District Shenzhen GD 518000 China readOnly: true country: description: The country where the warehouse resides. type: string example: HK readOnly: true entry_point: description: The [Entry Point](#tag/EntryPoints) id associated to the warehouse. type: string example: SZX002 readOnly: true id: description: The unique warehouse ID type: string example: WH0SZ001 language: description: The local language for the warehouse. type: string example: Chinese readOnly: true language_code: description: The local language code for the warehouse in ISO 639-1 format. type: string example: zh readOnly: true name: description: The warehouse name. type: string example: BoxC Shenzhen 1 readOnly: true required: - id warehouse-storage: allOf: - type: object $ref: '#/definitions/Warehouse' - type: object properties: storage: description: Information about the storage costs for the warehouse. type: object properties: free_days: type: integer description: The number of days a product will be stored for free. example: 30 readOnly: true large_cost: type: decimal description: The price per cubic meter for storing a large sized product. example: 30 readOnly: true medium_cost: type: decimal description: The price for storing one unit of a medium sized product. example: 0.03 readOnly: true small_cost: type: decimal description: The price for storing one unit of a small sized product. example: 0.01 readOnly: true webhook: type: object properties: active: description: Displays the webhook status. Inactive webhooks will not have events delivered until they're updated by the owner. type: boolean example: true readOnly: true address: description: The URL for the webhook that will process the event. type: string maxLength: 128 format: uri example: https://www.boxc.com/path/to/script created: description: The date and time the webhook was created. type: string example: '2024-07-18 14:10:01' format: datetime readOnly: true id: description: The unique ID of the webhook. type: integer example: 201921 readOnly: true topic: description: The topic the user wishes to subscribe to. Immutable. type: string enum: - fulfillments_complete - fulfillments_update - manifests_complete - orders_status - shipments_label - shipments_status example: shipments_status updated: description: The date and time the webhook was last updated. type: string example: '2024-07-19 12:16:41' format: datetime readOnly: true securityDefinitions: JWT: type: http scheme: bearer bearerScheme: JWT in: header description: All operations require a JSON Web Token after completing an [OAuth2 flow](#tag/Authentication). PrivilegedClient: type: http scheme: bearer bearerScheme: JWT description: Some clients require special privileges to use operations. No additional scope is needed. x-servers: - url: https://api.boxc.com/v1 x-tagGroups: - name: Overview tags: - Introduction - Authentication - RateLimit - Paginate - Changelog - name: Operations tags: - CalculateDuty - Classify - Invoices - Users - ValidateAddress - Webhooks - name: Shipping tags: - Credentials - CustomsProducts - EntryPoints - Estimate - Labels - Manifests - Overpacks - Shipments - Track - name: Fulfillment tags: - Inbound - Orders - Products - Shops - Warehouses - name: Returns tags: - Reshipments - Returns - name: Data tags: - CarrierCredentials - DangerousGoods - Errors - Languages - CarrierParameters - ReturnsProcess - TrackingEvents