get_rates
Estimate Japan shipping rates BEFORE creating a label (read-only — quotes only, creates nothing and spends nothing). Given a from_address (sender), a to_address (recipient) and the parcel (weight in GRAMS, dimensions in CENTIMETRES) plus the products, it asks Ship&co for the available carrier services and their prices (JPY), and flags the cheapest. Ship&co reaches Japan domestic couriers Yamato (ヤマト運輸) / Sagawa (佐川急便) / Japan Post (日本郵便) / Seino (西濃運輸) plus international DHL / UPS / FedEx. Use the returned carrier + service in create_shipment. NOTE: /rates returns quotes for the carriers registered in your Ship&co account; if none are registered you can still create TEST labels directly with create_shipment (carrier=yamato or sagawa, setup.test defaults true — no carrier account needed for test mode). Bring your own Ship&co API token via header x-shipandco-token.
Parameters25
| to_name | string | required | Recipient full name (氏名). Required. |
| to_company | string | optional | Recipient company name. Optional. |
| to_email | string | optional | Recipient email. Optional (some carriers/services require it). |
| to_phone | string | optional | Recipient phone number. Optional but recommended (many Japanese carriers require it). |
| to_zip | string | required | Recipient 7-digit Japanese postal code 郵便番号 (e.g. "150-0001" or "1500001"). Required. |
| to_province | string | required | Recipient prefecture 都道府県 (e.g. "Tokyo" / "東京都"). Required. |
| to_city | string | required | Recipient city / ward / town 市区町村 (e.g. "Shibuya-ku"). Required. |
| to_address1 | string | required | Recipient street address line 1 番地 (chome-banchi-go). Required. |
| to_address2 | string | optional | Recipient street address line 2 (building / room). Optional. |
| to_country | string | optional | Recipient ISO country code. Default "JP". |
| from_name | string | required | Sender full name (氏名). Required. |
| from_company | string | optional | Sender company name. Optional. |
| from_email | string | optional | Sender email. Optional (some carriers/services require it). |
| from_phone | string | optional | Sender phone number. Optional but recommended (many Japanese carriers require it). |
| from_zip | string | required | Sender 7-digit Japanese postal code 郵便番号 (e.g. "150-0001" or "1500001"). Required. |
| from_province | string | required | Sender prefecture 都道府県 (e.g. "Tokyo" / "東京都"). Required. |
| from_city | string | required | Sender city / ward / town 市区町村 (e.g. "Shibuya-ku"). Required. |
| from_address1 | string | required | Sender street address line 1 番地 (chome-banchi-go). Required. |
| from_address2 | string | optional | Sender street address line 2 (building / room). Optional. |
| from_country | string | optional | Sender ISO country code. Default "JP". |
| weight | number | required | Parcel weight in GRAMS (g). e.g. 1000 = 1 kg. Required. |
| length | number | optional | Parcel length/depth in CENTIMETRES (cm). Optional — provide length+width+height together if the carrier needs dimensions. |
| width | number | optional | Parcel width in CENTIMETRES (cm). Optional. |
| height | number | optional | Parcel height in CENTIMETRES (cm). Optional. |
| products | array | required | Parcel contents (at least one). Each: { name (required), price (required, JPY per unit), quantity (required int), origin_country? (ISO, for international) }. The declared goods value (sum of price x quantity, JPY) is what the owner policy gate checks. |
Raw schema
{
"type": "object",
"properties": {
"to_name": {
"type": "string",
"description": "Recipient full name (氏名). Required."
},
"to_company": {
"type": "string",
"description": "Recipient company name. Optional."
},
"to_email": {
"type": "string",
"description": "Recipient email. Optional (some carriers/services require it)."
},
"to_phone": {
"type": "string",
"description": "Recipient phone number. Optional but recommended (many Japanese carriers require it)."
},
"to_zip": {
"type": "string",
"description": "Recipient 7-digit Japanese postal code 郵便番号 (e.g. \"150-0001\" or \"1500001\"). Required."
},
"to_province": {
"type": "string",
"description": "Recipient prefecture 都道府県 (e.g. \"Tokyo\" / \"東京都\"). Required."
},
"to_city": {
"type": "string",
"description": "Recipient city / ward / town 市区町村 (e.g. \"Shibuya-ku\"). Required."
},
"to_address1": {
"type": "string",
"description": "Recipient street address line 1 番地 (chome-banchi-go). Required."
},
"to_address2": {
"type": "string",
"description": "Recipient street address line 2 (building / room). Optional."
},
"to_country": {
"type": "string",
"description": "Recipient ISO country code. Default \"JP\"."
},
"from_name": {
"type": "string",
"description": "Sender full name (氏名). Required."
},
"from_company": {
"type": "string",
"description": "Sender company name. Optional."
},
"from_email": {
"type": "string",
"description": "Sender email. Optional (some carriers/services require it)."
},
"from_phone": {
"type": "string",
"description": "Sender phone number. Optional but recommended (many Japanese carriers require it)."
},
"from_zip": {
"type": "string",
"description": "Sender 7-digit Japanese postal code 郵便番号 (e.g. \"150-0001\" or \"1500001\"). Required."
},
"from_province": {
"type": "string",
"description": "Sender prefecture 都道府県 (e.g. \"Tokyo\" / \"東京都\"). Required."
},
"from_city": {
"type": "string",
"description": "Sender city / ward / town 市区町村 (e.g. \"Shibuya-ku\"). Required."
},
"from_address1": {
"type": "string",
"description": "Sender street address line 1 番地 (chome-banchi-go). Required."
},
"from_address2": {
"type": "string",
"description": "Sender street address line 2 (building / room). Optional."
},
"from_country": {
"type": "string",
"description": "Sender ISO country code. Default \"JP\"."
},
"weight": {
"type": "number",
"description": "Parcel weight in GRAMS (g). e.g. 1000 = 1 kg. Required."
},
"length": {
"type": "number",
"description": "Parcel length/depth in CENTIMETRES (cm). Optional — provide length+width+height together if the carrier needs dimensions."
},
"width": {
"type": "number",
"description": "Parcel width in CENTIMETRES (cm). Optional."
},
"height": {
"type": "number",
"description": "Parcel height in CENTIMETRES (cm). Optional."
},
"products": {
"type": "array",
"description": "Parcel contents (at least one). Each: { name (required), price (required, JPY per unit), quantity (required int), origin_country? (ISO, for international) }. The declared goods value (sum of price x quantity, JPY) is what the owner policy gate checks.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Product name (品名)."
},
"price": {
"type": "number",
"description": "Unit price in JPY. Required (used for the declared value and the owner policy gate)."
},
"quantity": {
"type": "number",
"description": "Quantity (integer >= 1). Required."
},
"origin_country": {
"type": "string",
"description": "ISO origin country code (for international customs). Optional."
}
},
"required": [
"name",
"price",
"quantity"
]
}
}
},
"required": [
"to_name",
"to_zip",
"to_province",
"to_city",
"to_address1",
"from_name",
"from_zip",
"from_province",
"from_city",
"from_address1",
"weight",
"products"
]
}