### Seino Carrier Setup Source: https://developer.shipandco.com/en/getting-started-request-examples Example of registering a Seino carrier with access key and sender information. ```APIDOC ## POST /v1/carriers ### Description Registers a new carrier integration. ### Method POST ### Endpoint /v1/carriers ### Request Body - **type** (string) - Required - The type of carrier (e.g., "seino"). - **credentials** (object) - Required - Carrier-specific credentials. - **access_key** (string) - Required - Your access key for the carrier. - **niokurinin** (string) - Required - Sender information for the carrier. ### Request Example ```json { "type": "seino", "credentials": { "access_key": "your_access_key", "niokurinin": "your_niokurinin" } } ``` ``` -------------------------------- ### Yamato Carrier Setup Source: https://developer.shipandco.com/en/getting-started-request-examples Example of registering a Yamato carrier with its credentials and print settings. ```APIDOC ## POST /v1/carriers ### Description Registers a new carrier integration. ### Method POST ### Endpoint /v1/carriers ### Request Body - **type** (string) - Required - The type of carrier (e.g., "yamato"). - **credentials** (object) - Required - Carrier-specific credentials. - **key** (string) - Required - Your API key for the carrier. - **freight_number** (string) - Optional - Freight number for the carrier (default: '01'). - **settings** (object) - Optional - Carrier-specific settings. - **print** (object) - Optional - Print settings. - **size** (string) - Required - Label size to use. Valid values: "PDF_A4", "PDF_A5", "PDF_A4_BW", "PDF_A5_BW", "PDF_4.5X7.8". - **print.size_fallback** (string) - Optional - Fallback label size for thermal types. - **scheduled_delivery_email** (object) - Optional - Settings for scheduled delivery email notifications. - **enabled** (boolean) - Required - Enable or disable email notifications. - **message** (string) - Required when enabled - Custom message for the email (up to 74 characters). - **label.delivery_date** (boolean) - Optional - Automatically print the earliest possible delivery date on the label. ### Request Example ```json { "type": "yamato", "credentials": { "key": "your_key", "freight_number": "your_freight_number" }, "settings": { "print": { "size": "PDF_A4" } } } ``` ### Response #### Success Response (200) Registered carrier information with its ID. - **id** (string) - The unique identifier for the registered carrier. - **type** (string) - The type of carrier. - **state** (string) - The current state of the carrier integration (e.g., "active"). - **created_at** (string) - Timestamp when the carrier was created. - **updated_at** (string) - Timestamp when the carrier was last updated. - **credentials** (object) - Carrier credentials (sensitive fields are masked). - **settings** (object) - Carrier-specific settings. #### Response Example ```json { "id": "a5PZ3428ku784W7gc", "type": "yamato", "state": "active", "created_at": "2025-03-10T06:49:21.730Z", "updated_at": "2025-03-10T06:49:21.730Z", "credentials": { "key": "*****", "freight_number": "*****" }, "settings": { "print": { "size": "PDF_A4" } } } ``` ``` -------------------------------- ### Pegasus Carrier Setup Source: https://developer.shipandco.com/en/getting-started-request-examples Example of registering a Pegasus carrier with user ID and password. ```APIDOC ## POST /v1/carriers ### Description Registers a new carrier integration. ### Method POST ### Endpoint /v1/carriers ### Request Body - **type** (string) - Required - The type of carrier (e.g., "pegasus"). - **credentials** (object) - Required - Carrier-specific credentials. - **user_id** (string) - Required - Your user ID for the carrier. - **password** (string) - Required - Your password for the carrier. ### Request Example ```json { "type": "pegasus", "credentials": { "user_id": "your_user_id", "password": "your_password" } } ``` ``` -------------------------------- ### Request Example Source: https://developer.shipandco.com/en/err-res This is an example of a request payload for getting shipping rates. ```APIDOC ## Request Example ### Description This example shows the structure of a request payload for retrieving shipping rates. ### Request Body - **setup** (object) - Setup information for the request. - **currency** (string) - Required. The currency for the rates. - **ref_number** (string) - Optional. A reference number. - **signature** (boolean) - Optional. Whether signature is required. - **to_address** (object) - Required. The destination address. - **full_name** (string) - Required. Full name of the recipient. - **phone** (string) - Required. Phone number of the recipient. - **country** (string) - Required. Country code (ISO 3166-1 alpha-2). - **zip** (string) - Required. Postal code. - **city** (string) - Required. City name. - **address1** (string) - Required. Street address line 1. - **from_address** (object) - Required. The sender's address. - **full_name** (string) - Required. Full name of the sender. - **company** (string) - Optional. Company name. - **email** (string) - Optional. Email address of the sender. - **phone** (string) - Required. Phone number of the sender. - **country** (string) - Required. Country code (ISO 3166-1 alpha-2). - **zip** (string) - Required. Postal code. - **province** (string) - Optional. Province or state. - **city** (string) - Required. City name. - **address1** (string) - Required. Street address line 1. - **address2** (string) - Optional. Street address line 2. - **products** (array) - Required. List of products in the shipment. - **name** (string) - Required. Name of the product. - **quantity** (integer) - Required. Quantity of the product. - **price** (integer) - Required. Price of the product. - **origin_country** (string) - Required. Origin country of the product. - **parcels** (array) - Required. List of parcels in the shipment. - **weight** (integer) - Required. Weight of the parcel in grams. - **amount** (integer) - Required. Number of items in the parcel. - **width** (integer) - Required. Width of the parcel in cm. - **height** (integer) - Required. Height of the parcel in cm. - **depth** (integer) - Required. Depth of the parcel in cm. - **customs** (object) - Optional. Customs information. - **content_type** (string) - Required. Type of content (e.g., "MERCHANDISE"). ### Request Example ```json { "setup": { "currency": "JPY", "ref_number": "123-REF-3456", "signature": false }, "to_address": { "full_name": "John Doe", "phone": "09000000", "country": "FR", "zip": "75002", "city": "Paris", "address1": "12 Rue du 2 juillet" }, "from_address": { "full_name": "Yamada Taro", "company": "World Company", "email": "ytaro@worldcompany.com", "phone": "080000000", "country": "JP", "zip": "6050012", "province": "KYOTO", "city": "KYOTO", "address1": "HIGASHIYAMA KU", "address2": "SAIKAISHICHO" }, "products": [ { "name": "T-Shirt", "quantity": 2, "price": 25000, "origin_country": "JP" } ], "parcels": [ { "weight": 2000, "amount": 1, "width": 10, "height": 10, "depth": 10 } ], "customs": { "content_type": "MERCHANDISE" } } ``` ``` -------------------------------- ### Sagawa Carrier Setup Source: https://developer.shipandco.com/en/getting-started-request-examples Example of configuring Sagawa carrier settings, including print size. ```APIDOC ## POST /v1/carriers ### Description Registers a new carrier integration. ### Method POST ### Endpoint /v1/carriers ### Request Body - **type** (string) - Required - The type of carrier (e.g., "sagawa"). - **settings** (object) - Optional - Carrier-specific settings. - **print** (object) - Optional - Print settings. - **size** (string) - Required - Label size to use. Valid values: "PDF_A5", "PDF_4.2X8.3_BLUE", "PDF_4.2X8.3_GREEN". ### Request Example ```json { "type": "sagawa", "settings": { "print": { "size": "PDF_A5" } } } ``` ``` -------------------------------- ### Yamato International Carrier Setup Source: https://developer.shipandco.com/en/getting-started-request-examples Example of registering a Yamato International carrier with its credentials. ```APIDOC ## POST /v1/carriers ### Description Registers a new carrier integration. ### Method POST ### Endpoint /v1/carriers ### Request Body - **type** (string) - Required - The type of carrier (e.g., "yamato_international"). - **credentials** (object) - Required - Carrier-specific credentials. - **user_key** (string) - Required - Your user key for the carrier. - **freight_number** (string) - Optional - Freight number for the carrier (default: '01'). ### Request Example ```json { "type": "yamato_international", "credentials": { "user_key": "your_user_key", "freight_number": "your_freight_number" } } ``` ``` -------------------------------- ### Request Example for Rates Source: https://developer.shipandco.com/en/webhooks-retries This is an example of a request payload used to get shipping rates. ```APIDOC ## Request Example for Rates ### Description This example demonstrates the structure of a request to retrieve shipping rates, including address details, product information, and parcel dimensions. ### Request Body ```json { "setup": { "currency": "JPY", "ref_number": "123-REF-3456", "signature": false }, "to_address": { "full_name": "John Doe", "phone": "09000000", "country": "FR", "zip": "75002", "city": "Paris", "address1": "12 Rue du 2 juillet" }, "from_address": { "full_name": "Yamada Taro", "company": "World Company", "email": "ytaro@worldcompany.com", "phone": "080000000", "country": "JP", "zip": "6050012", "province": "KYOTO", "city": "KYOTO", "address1": "HIGASHIYAMA KU", "address2": "SAIKAISHICHO" }, "products": [ { "name": "T-Shirt", "quantity": 2, "price": 25000, "origin_country": "JP" } ], "parcels": [ { "weight": 2000, "amount": 1, "width": 10, "height": 10, "depth": 10 } ], "customs": { "content_type": "MERCHANDISE" } } ``` ``` -------------------------------- ### Seino Carrier Setup Source: https://developer.shipandco.com/en/err Configure credentials for the Seino carrier. Refer to support for detailed instructions. ```APIDOC ## Seino Carrier Setup ### Description Configure the necessary credentials for the Seino carrier. For detailed instructions, please refer to our support page. ### Credentials - **access_key** (string) - Required - Your access key for Seino. - **niokurinin** (string) - Required - The sender's name for Seino. ``` -------------------------------- ### Rate Request Example Source: https://developer.shipandco.com/en/getting-started-how-it-works This is an example of a request body used to get shipping rates. ```APIDOC ## Rate Request Example ### Description This is an example of a request body used to get shipping rates. ### Request Example ```json { "setup": { "currency": "JPY", "ref_number": "123-REF-3456", "signature": false }, "to_address": { "full_name": "John Doe", "phone": "09000000", "country": "FR", "zip": "75002", "city": "Paris", "address1": "12 Rue du 2 juillet" }, "from_address": { "full_name": "Yamada Taro", "company": "World Company", "email": "ytaro@worldcompany.com", "phone": "080000000", "country": "JP", "zip": "6050012", "province": "KYOTO", "city": "KYOTO", "address1": "HIGASHIYAMA KU", "address2": "SAIKAISHICHO" }, "products": [ { "name": "T-Shirt", "quantity": 2, "price": 25000, "origin_country": "JP" } ], "parcels": [ { "weight": 2000, "amount": 1, "width": 10, "height": 10, "depth": 10 } ], "customs": { "content_type": "MERCHANDISE" } } ``` ``` -------------------------------- ### Seino Carrier Setup Source: https://developer.shipandco.com/en/tracking Information on setting up the Seino carrier. ```APIDOC ## Carrier Setup - Seino ### Description For Seino carrier setup, refer to our support page for detailed instructions. ### Parameters #### Request Body - **credentials.access_key** (string) - Required - The access key for authentication. - **credentials.niokurinin** (string) - Required - The sender information. ``` -------------------------------- ### Seino Carrier Setup Source: https://developer.shipandco.com/en/getting-started Instructions for setting up the Seino carrier, requiring access key and sender information. ```APIDOC ## Seino Carrier Setup ### Description Set up the Seino carrier. Refer to the support page for detailed instructions. ### Parameters #### Request Body (within carrier registration/update) - **credentials.access_key** (string) - Required - Your access key for Seino. - **credentials.niokurinin** (string) - Required - Sender information for Seino. ``` -------------------------------- ### Carrier Setup - Seino Source: https://developer.shipandco.com/en/pagination Credentials and settings for Seino carrier. Refer to support page for detailed instructions. ```APIDOC #### Seino access_key`string``required` niokurinin`string``required` ``` -------------------------------- ### FedEx Carrier Setup Source: https://developer.shipandco.com/en/getting-started-request-examples Example of configuring FedEx carrier settings, including print size. ```APIDOC ## POST /v1/carriers ### Description Registers a new carrier integration. ### Method POST ### Endpoint /v1/carriers ### Request Body - **type** (string) - Required - The type of carrier (e.g., "fedex"). - **settings** (object) - Optional - Carrier-specific settings. - **print** (object) - Optional - Print settings. - **size** (string) - Required - Label size to use. Valid values: "PDF_A4", "PDF_4X6", "PDF_4X8", "PDF_4X9", "ZPL_4X6", "ZPL_4X8". ### Request Example ```json { "type": "fedex", "settings": { "print": { "size": "PDF_4X6" } } } ``` ``` -------------------------------- ### Seino Carrier Setup Source: https://developer.shipandco.com/en/common Configure settings for the Seino carrier. ```APIDOC ## Seino Carrier Setup ### Description Configure settings for the Seino carrier. Refer to our support page for detailed instructions. ### Request Body - **credentials.access_key** (string) - Required - Your Seino access key. - **credentials.niokurinin** (string) - Required - Your Seino sender information. ``` -------------------------------- ### DHL Carrier Setup Source: https://developer.shipandco.com/en/getting-started-request-examples Example of configuring DHL carrier settings, including print size and label options. ```APIDOC ## POST /v1/carriers ### Description Registers a new carrier integration. ### Method POST ### Endpoint /v1/carriers ### Request Body - **type** (string) - Required - The type of carrier (e.g., "dhl"). - **settings** (object) - Optional - Carrier-specific settings. - **print** (object) - Optional - Print settings. - **size** (string) - Required - Label size to use. Valid values: "PDF_A4", "PDF_4X6", "PDF_4X8", "ZPL_4X6". - **label.hide_account** (boolean) - Optional - Whether to print account information on labels. - **label.extra_page** (boolean) - Optional - Whether to create a page for archiving. ### Request Example ```json { "type": "dhl", "settings": { "print": { "size": "PDF_4X6" }, "label": { "hide_account": true, "extra_page": false } } } ``` ``` -------------------------------- ### Response Example Source: https://developer.shipandco.com/en/webhooks-overview This is an example of a successful response when retrieving shipping rates. ```APIDOC ## Response Example This is an example of a successful response when retrieving shipping rates. ### Response Example ```json [ { "carrier_id": "nznqM23wD3apjEJF6", "carrier": "dhl", "service": "dhl_express_0900", "currency": "JPY", "price": 10129, "surcharges": [ { "type": "9:00 PREMIUM", "price": 5500 } ] }, { "carrier_id": "nznqM23wD3apjEJF6", "carrier": "dhl", "service": "dhl_express_worldwide", "currency": "JPY", "price": 3021, "surcharges": [] }, { "carrier_id": "eMYDqTqiaR4Bdf4wW", "carrier": "fedex", "service": "fedex_international_first", "currency": "JPY", "price": 54954, "surcharges": [ { "type": "Demand Surcharge", "price": 360 } ] }, { "carrier_id": "eMYDqTqiaR4Bdf4wW", "carrier": "fedex", "service": "fedex_international_priority_express", "currency": "JPY", "price": 4116, "surcharges": [ { "type": "Demand Surcharge", "price": 360 } ] }, { "carrier_id": "FPTThBHJhDTA4CzPv", "carrier": "japanpost", "service": "japanpost_ems", "currency": "JPY", "price": 6700, "surcharges": [] }, { "carrier_id": "FPTThBHJhDTA4CzPv", "carrier": "japanpost", "service": "japanpost_smallpacket_air", "currency": "JPY", "price": 3930, "surcharges": [] } ] ``` ``` -------------------------------- ### Request Example Source: https://developer.shipandco.com/en/webhooks-overview This is an example of a request body for creating shipping rates. ```APIDOC ## Request Example This is an example of a request body for creating shipping rates. ### Request Body ```json { "setup": { "currency": "JPY", "ref_number": "123-REF-3456", "signature": false }, "to_address": { "full_name": "John Doe", "phone": "09000000", "country": "FR", "zip": "75002", "city": "Paris", "address1": "12 Rue du 2 juillet" }, "from_address": { "full_name": "Yamada Taro", "company": "World Company", "email": "ytaro@worldcompany.com", "phone": "080000000", "country": "JP", "zip": "6050012", "province": "KYOTO", "city": "KYOTO", "address1": "HIGASHIYAMA KU", "address2": "SAIKAISHICHO" }, "products": [ { "name": "T-Shirt", "quantity": 2, "price": 25000, "origin_country": "JP" } ], "parcels": [ { "weight": 2000, "amount": 1, "width": 10, "height": 10, "depth": 10 } ], "customs": { "content_type": "MERCHANDISE" } } ``` ``` -------------------------------- ### Japan Post International Carrier Setup Source: https://developer.shipandco.com/en/getting-started-request-examples Example of configuring Japan Post International carrier settings, including print size. ```APIDOC ## POST /v1/carriers ### Description Registers a new carrier integration. ### Method POST ### Endpoint /v1/carriers ### Request Body - **type** (string) - Required - The type of carrier (e.g., "japan_post_international"). - **settings** (object) - Optional - Carrier-specific settings. - **print** (object) - Optional - Print settings. - **size** (string) - Required - Label size to use. Valid values: "PDF_A4". ### Request Example ```json { "type": "japan_post_international", "settings": { "print": { "size": "PDF_A4" } } } ``` ``` -------------------------------- ### Authentication Header Example Source: https://developer.shipandco.com/en/getting-started-request-examples This example shows how to include your API token in the request headers for authentication. ```APIDOC ## Authentication The Ship&co API uses API keys to authenticate requests. Adding the API token to HTTP headers enables you to be authorized to use the API. ### Request Headers ```json { "x-access-token": "YOUR_API_TOKEN_FROM_DASHBOARD", "Content-Type": "application/json" } ``` ``` -------------------------------- ### Request for Shipping Rates Source: https://developer.shipandco.com/en/webhooks-best-practices This is an example of a request payload used to get shipping rates. It includes details about the sender, recipient, products, and parcels. ```APIDOC ## Request for Shipping Rates ### Description This example demonstrates the structure of a request to obtain shipping rates, including address details, product information, and parcel dimensions. ### Request Example ```json { "setup": { "currency": "JPY", "ref_number": "123-REF-3456", "signature": false }, "to_address": { "full_name": "John Doe", "phone": "09000000", "country": "FR", "zip": "75002", "city": "Paris", "address1": "12 Rue du 2 juillet" }, "from_address": { "full_name": "Yamada Taro", "company": "World Company", "email": "ytaro@worldcompany.com", "phone": "080000000", "country": "JP", "zip": "6050012", "province": "KYOTO", "city": "KYOTO", "address1": "HIGASHIYAMA KU", "address2": "SAIKAISHICHO" }, "products": [ { "name": "T-Shirt", "quantity": 2, "price": 25000, "origin_country": "JP" } ], "parcels": [ { "weight": 2000, "amount": 1, "width": 10, "height": 10, "depth": 10 } ], "customs": { "content_type": "MERCHANDISE" } } ``` ``` -------------------------------- ### Get Shipping Rates Request and Response Source: https://developer.shipandco.com/en/rate This section shows an example of a request to the Rate API and its corresponding successful response, including how errors are reported. ```APIDOC ## Get Shipping Rates ### Description Retrieves available shipping rates based on the provided shipment details. ### Request Body ```json { "setup": { "currency": "JPY", "ref_number": "123-REF-3456", "signature": false }, "to_address": { "full_name": "John Doe", "phone": "09000000", "country": "FR", "zip": "75002", "city": "Paris", "address1": "12 Rue du 2 juillet" }, "from_address": { "full_name": "Yamada Taro", "company": "World Company", "email": "ytaro@worldcompany.com", "phone": "080000000", "country": "JP", "zip": "6050012", "province": "KYOTO", "city": "KYOTO", "address1": "HIGASHIYAMA KU", "address2": "SAIKAISHICHO" }, "products": [ { "name": "T-Shirt", "quantity": 2, "price": 25000, "origin_country": "JP" } ], "parcels": [ { "weight": 2000, "amount": 1, "width": 10, "height": 10, "depth": 10 } ], "customs": { "content_type": "MERCHANDISE" } } ``` ### Response #### Success Response (200) Returns an array of shipping rates. Includes an `errors` array if specific carriers fail. ```json [ { "carrier_id": "nznqM23wD3apjEJF6", "carrier": "dhl", "service": "dhl_express_0900", "currency": "JPY", "price": 10129, "surcharges": [ { "type": "9:00 PREMIUM", "price": 5500 } ] }, { "carrier_id": "nznqM23wD3apjEJF6", "carrier": "dhl", "service": "dhl_express_worldwide", "currency": "JPY", "price": 3021, "surcharges": [] }, { "carrier_id": "eMYDqTqiaR4Bdf4wW", "carrier": "fedex", "service": "fedex_international_first", "currency": "JPY", "price": 54954, "surcharges": [ { "type": "Demand Surcharge", "price": 360 } ] }, { "carrier_id": "eMYDqTqiaR4Bdf4wW", "carrier": "fedex", "service": "fedex_international_priority_express", "currency": "JPY", "price": 4116, "surcharges": [ { "type": "Demand Surcharge", "price": 360 } ] }, { "carrier_id": "FPTThBHJhDTA4CzPv", "carrier": "japanpost", "service": "japanpost_ems", "currency": "JPY", "price": 6700, "surcharges": [] }, { "carrier_id": "FPTThBHJhDTA4CzPv", "carrier": "japanpost", "service": "japanpost_smallpacket_air", "currency": "JPY", "price": 3930, "surcharges": [] } ] ``` #### Error Handling When errors occur for specific carriers, the response includes both successful rates and an `errors` array containing details about failed carriers. Inside the array, each error object includes the `carrier` name and the corresponding error `message`. ```json { "rates": [ { "carrier_id": "aZSzwKJDGP5KfdRid", "carrier": "fedex", "service": "fedex_international_first", "currency": "JPY", "price": 31235, "surcharges": [] } ], "errors": [ { "carrier": "ups", "message": "Invalid destination address" }, { "carrier": "japanpost", "message": "Service not available for this destination" } ] } ``` ```