{ "swagger": "2.0", "info": { "title": "Carriyo Shipments API", "version": "1.0", "description": "You can use the Carriyo Shipment API to create and manage shipments with any one of carriers supported by Carriyo.\n\nA shipment is defined as single unit of items that shipped from the same origin to the same the destination, to be shipped together at the same time. A shipment can contain multiple parcels all shipped together to the same recepient.\n\nA shipment is identified by an Carriyo generated shipment-id. It can also be identified by the client provided unique shipment reference, called as the partner_shipment_reference.\n\nAll API endpoints require OAuth access token to be passed 'Authorization' as a Bearer Token.", "contact": { "name": "Faisel Azeez", "url": "http://www.carriyo.com", "email": "support@carriyo.com" }, "license": { "name": "" } }, "host": "demo-api.carriyo.com", "paths": { "/shipments": { "post": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } }, "400": { "description": "", "schema": { "type": "object", "title": "Create shipment error response", "properties": { "timestamp": { "type": "string", "description": "date in format: \nyyyy-MM-dd'T'HH:mm:ss.SSSXXX" }, "errors": { "type": [ "string", "array" ], "description": "Array of validation errors", "items": { "type": "string" } } } } } }, "summary": "Create Shipment", "description": "This endpoint creates a new shipment in Carriyo. User may specify the concrete carrier on shipment creation or it will be assigned automatically based on the rules configured at the merchant level.\n\nIn response to the create shipment request Carriyo returns the shipment object with a unique Carriyo shipment ID in the “pending” status, and asynchronously sends the booking request to assigned carrier. The carrier creates the shipment in its system and returns the AWB or tracking number, the AWB label, the status, and any other attributes available.\n\nOnce the shipment is successfully booked at the carrier, the status of the shipment is updated to \"booked\". However if the shipment booking fails for some reason, its status is updated to \"error\".\n\nShipment webhooks may be configured for the merchant at Carriyo to notify the client about any status of the shipment.", "operationId": "create-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string", "default": "application/json" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Request", "description": "This payload is being used to perform operations on a shipment.", "properties": { "merchant": { "type": "string", "description": "Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used." }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z" }, "language": { "description": "Must be a two letter ISO 639-1 code. Example: en", "enum": [ "ISO 639-1" ], "type": "string" }, "": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff" ] } } ], "tags": [ "shipment-api" ] } }, "/shipments/draft/{shipment_id}": { "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ], "patch": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Shipment Draft Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" } }, "required": [ "references" ] } } }, "summary": "Update Draft Shipment", "description": "This endpoint updates draft shipment properties.", "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Draft Request", "properties": { "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_name": { "type": "string" }, "partner_location_code": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_code": { "type": "string" }, "partner_location_name": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attriutes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time" } }, "required": [ "references" ] } } ], "operationId": "update-draft-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "draft-shipment-api" ] } }, "/reverse-shipments/{shipment_id}/parcels": { "put": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Update Parcels Reverse Shipment", "description": "This endpoint allows the tenant to update the parcel information after the initial reverse-shipment is created. \n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "operationId": "update-parcels-reverse-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string", "default": "application/json" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Update Parcels Request", "properties": { "parcels": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } } } } } ], "tags": [ "reverse-shipment-api" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/shipments/{shipment_id}/parcels": { "put": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Update Parcels", "description": "This endpoint allows the tenant to update the parcel information after the initial shipment is created. \n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "operationId": "update-parcels", "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string", "default": "application/json" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Update Parcels Request", "properties": { "parcels": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } } } } } ], "tags": [ "shipment-api" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/shipments/{shipment_id}/ready-to-ship": { "patch": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Ready to Ship", "operationId": "ready-to-ship", "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Update Parcels Request", "properties": { "parcels": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } } } } } ], "description": "This endpoint sets the shipment as ready-to-ship for carriers supporting the operation. This is usually useful for on-demand carrier service where the carrier only picks up the shipment once notified.\n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "consumes": [ "application/json" ], "tags": [ "shipment-api" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/reverse-shipments/{shipment_id}/ready-to-ship": { "patch": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Ready to Ship Reverse Shipment", "operationId": "ready-to-ship-reverse-shipment", "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Update Parcels Request", "properties": { "parcels": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } } } } } ], "description": "This endpoint sets the reverse-shipment as ready-to-ship for carriers supporting the operation. This is usually useful for on-demand carrier service where the carrier only picks up the shipment once notified.\n\nThe `shipment_id` is used as a path parameter to identify the reverse-shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "consumes": [ "application/json" ], "tags": [ "reverse-shipment-api" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/shipments/{shipment_id}/reassign": { "patch": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Reassign Shipment", "description": "This endpoint reassigns any unshipped shipments to a different carrier or can be used to simply retry any shipments that are in \"error\" state due to a failure on the carrier side.\n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.\n\n* To retry the shipment, original carrier account object should be specified in request.\n* To reassign the shipment, target carrier account should be specified in the request.\n* If no carrier account object specified, the rules engine will trigger to find the best suitable one. \n* Otherwise, operation has no effect.\n", "operationId": "reassign-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "properties": { "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } } } } } ], "tags": [ "shipment-api" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/shipments/{shipment_id}/reprocess": { "put": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Reprocess Shipment", "description": "This endpoint is used to reprocess shipments that are in the \"error\" state due to validation failure on the carrier side. The entire shipment object is required to be passed in the request.\n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "operationId": "reprocess-shipment", "tags": [ "shipment-api" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Request", "description": "This payload is being used to perform operations on a shipment.", "properties": { "merchant": { "type": "string", "description": "Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used." }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z" }, "language": { "description": "Must be a two letter ISO 639-1 code. Example: en", "enum": [ "ISO 639-1" ], "type": "string" }, "": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff" ] } } ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/reverse-shipments/{shipment_id}/label": { "get": { "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "awb": { "type": "string" } } } } }, "summary": "Get Label Reverse Shipment", "operationId": "get-label-reverse-shipment", "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" } ], "description": "This endpoint returns the AWB label URL for the given shipment id.\n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "tags": [ "reverse-shipment-api" ], "consumes": [ "application/json" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/shipments/{shipment_id}/label": { "get": { "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "awb": { "type": "string" } } } } }, "summary": "Get Label", "operationId": "get-label", "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" } ], "description": "This endpoint returns the AWB label URL for the given shipment id.\n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "tags": [ "shipment-api" ], "consumes": [ "application/json" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/reverse-shipments/draft/{shipment_id}/confirm": { "patch": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Confirm Draft Reverse Shipment", "description": "This endpoint is intended to confirm a draft reverse-shipment. The result of this operation is similar to the result of creating a regular reverse-shipment: the latter goes to \"pending\" state and the asynchronous request is being sent to the corresponding carrier.", "operationId": "confirm-reverse-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Request", "description": "This payload is being used to perform operations on a shipment.", "properties": { "merchant": { "type": "string", "description": "Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used." }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z" }, "language": { "description": "Must be a two letter ISO 639-1 code. Example: en", "enum": [ "ISO 639-1" ], "type": "string" }, "": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff" ] } } ], "tags": [ "draft-reverse-shipment-api" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/shipments/draft/{shipment_id}/confirm": { "patch": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Confirm Draft Shipment", "description": "This endpoint is intended to confirm a draft shipment. The result of this operation is similar to the result of creating a regular shipment: the latter goes to \"pending\" state and the asynchronous request is being sent to the corresponding carrier.", "operationId": "confirm-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Request", "description": "This payload is being used to perform operations on a shipment.", "properties": { "merchant": { "type": "string", "description": "Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used." }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z" }, "language": { "description": "Must be a two letter ISO 639-1 code. Example: en", "enum": [ "ISO 639-1" ], "type": "string" }, "": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff" ] } } ], "tags": [ "draft-shipment-api" ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/shipments/draft": { "post": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Shipment Draft Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" } }, "required": [ "references" ] } } }, "summary": "Create Draft Shipment", "description": "The shipment can also be created as a draft, in which case the shipment is not submitted to the carrier until it is confirmed. This is useful if the tenant does not have all the information to create a valid shipment upfront. For instance, a draft shipment can be created without a pickup location and when the pickup location is determined the tenant can update and confirm the draft shipment.\n", "operationId": "create-draft-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Draft Request", "properties": { "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_name": { "type": "string" }, "partner_location_code": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_code": { "type": "string" }, "partner_location_name": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attriutes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time" } }, "required": [ "references" ] } } ], "tags": [ "draft-shipment-api" ] } }, "/shipments/{shipment-id}": { "get": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } }, "404": { "description": "", "schema": { "type": "object", "title": "Create shipment error response", "properties": { "timestamp": { "type": "string", "description": "date in format: \nyyyy-MM-dd'T'HH:mm:ss.SSSXXX" }, "errors": { "type": [ "string", "array" ], "description": "Array of validation errors", "items": { "type": "string" } } } }, "examples": { "application/json": { "status": "404", "timestamp": "2020-12-07T13:50:11.853Z", "errors": [ "No shipment found with the shipment id: KHNI57EYOAICSdf" ] } } } }, "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment-id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" } ], "summary": "Get Shipment", "operationId": "get-shipment", "produces": [ "application/json" ], "description": "This endpoint returns the latest shipment object including the most up-to-date status information.\n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "tags": [ "shipment-api" ], "consumes": [ "application/json" ] } }, "/client-webhook": { "post": { "responses": { "200": { "description": "", "schema": { "type": "object", "properties": {} } }, "400": { "description": "" }, "500": { "description": "" } }, "summary": "Client Webhook / Carriyo Callback", "description": "This endpoint represents the webhook implemented on the client side to receive a callback from Carriyo for status and label updates.\n\nIt is important to note that the Carriyo shipment model will evolve along with the Carriyo product evolution. Hence the webhook endpoint must consume the data that it needs and ignore all other fields and unrecognised fields that might be added in the future.", "operationId": "carriyo-callback-webhook", "consumes": [ "application/json" ], "security": [ { "API Key": [] } ], "parameters": [ { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } ], "tags": [ "webhook" ] } }, "/reverse-shipments": { "post": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } }, "400": { "description": "", "schema": { "type": "object", "title": "Create shipment error response", "properties": { "timestamp": { "type": "string", "description": "date in format: \nyyyy-MM-dd'T'HH:mm:ss.SSSXXX" }, "errors": { "type": [ "string", "array" ], "description": "Array of validation errors", "items": { "type": "string" } } } } } }, "summary": "Create Reverse Shipment", "description": "This endpoint creates a new reverse shipment in Carriyo. User may specify the concrete carrier on shipment creation or it will be assigned automatically based on the rules configured at the merchant level.\n\nIn response to the create reverse shipment request Carriyo returns the reverse shipment object with a unique Carriyo shipment ID in the “pending” status, and asynchronously sends the booking request to assigned carrier. The carrier creates the reverse shipment in its system and returns the AWB or tracking number, the AWB label, the status, and any other attributes available.\n\nOnce the shipment is successfully booked at the carrier, the status of the shipment is updated to \"booked\". However if the shipment booking fails for some reason, its status is updated to \"error\".\n\nShipment webhooks may be configured for the merchant at Carriyo to notify the client about any status of the shipment.", "operationId": "create-reverse-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string", "default": "application/json" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Request", "description": "This payload is being used to perform operations on a shipment.", "properties": { "merchant": { "type": "string", "description": "Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used." }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z" }, "language": { "description": "Must be a two letter ISO 639-1 code. Example: en", "enum": [ "ISO 639-1" ], "type": "string" }, "": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff" ] } } ], "tags": [ "reverse-shipment-api" ] } }, "/shipments/bulk/status": { "get": { "responses": { "200": { "description": "", "schema": { "type": "array", "items": { "type": "object", "title": "Bulk Shipment Status Response", "properties": { "shipmentId": { "type": "string" }, "status": { "type": "object", "enum": [ "pending", "error", "booked", "ready-to-ship", "shipped", "out_for_delivery", "delivered", "cancelled", "failed_collection_attempt", "in_transit", "awaiting_customer_collection", "delivery_confirmed", "failed_delivery_attempt", "ready_for_return", "return_in_transit", "returned", "return_confirmed", "suspended", "missing", "delayed" ], "title": "Carriyo Response Status" }, "milestones": { "type": [ "string", "array" ], "description": "The list of all shipment statuses", "items": { "type": "object", "properties": { "status": { "type": "object", "enum": [ "pending", "error", "booked", "ready-to-ship", "shipped", "out_for_delivery", "delivered", "cancelled", "failed_collection_attempt", "in_transit", "awaiting_customer_collection", "delivery_confirmed", "failed_delivery_attempt", "ready_for_return", "return_in_transit", "returned", "return_confirmed", "suspended", "missing", "delayed" ], "title": "Carriyo Response Status" }, "date": { "type": "string" } } } } } } } } }, "summary": "Get Bulk Shipment Statuses", "consumes": [ "application/json" ], "produces": [ "application/json" ], "operationId": "get-balk-shipment-status", "tags": [ "shipment-api" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "query", "name": "shipment_id", "type": "array", "items": { "type": "string" } }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" } ], "description": "This endpoint is designed to provide user with the statuses of requested shipments. Parameter `shipment_id` can be specified multiple times. The result of this operation is the list of shipments' current statuses and all milestones." } }, "/reverse-shipments/bulk/status": { "get": { "responses": { "200": { "description": "", "schema": { "type": "array", "items": { "type": "object", "title": "Bulk Shipment Status Response", "properties": { "shipmentId": { "type": "string" }, "status": { "type": "object", "enum": [ "pending", "error", "booked", "ready-to-ship", "shipped", "out_for_delivery", "delivered", "cancelled", "failed_collection_attempt", "in_transit", "awaiting_customer_collection", "delivery_confirmed", "failed_delivery_attempt", "ready_for_return", "return_in_transit", "returned", "return_confirmed", "suspended", "missing", "delayed" ], "title": "Carriyo Response Status" }, "milestones": { "type": [ "string", "array" ], "description": "The list of all shipment statuses", "items": { "type": "object", "properties": { "status": { "type": "object", "enum": [ "pending", "error", "booked", "ready-to-ship", "shipped", "out_for_delivery", "delivered", "cancelled", "failed_collection_attempt", "in_transit", "awaiting_customer_collection", "delivery_confirmed", "failed_delivery_attempt", "ready_for_return", "return_in_transit", "returned", "return_confirmed", "suspended", "missing", "delayed" ], "title": "Carriyo Response Status" }, "date": { "type": "string" } } } } } } } } }, "summary": "Get Bulk Reverse Shipment Statuses", "consumes": [ "application/json" ], "produces": [ "application/json" ], "operationId": "get-bulk-reverse-shipment-status", "tags": [ "reverse-shipment-api" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "query", "name": "shipment_id", "type": "array", "items": { "type": "string" } }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" } ], "description": "This endpoint is designed to provide user with the statuses of requested shipments. Parameter `shipment_id` can be specified multiple times. The result of this operation is the list of shipments' current statuses and all milestones." } }, "/reverse-shipments/draft": { "post": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Create Draft Reverse Shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "operationId": "create-draft-reverse-shipment", "tags": [ "draft-reverse-shipment-api" ], "description": "The reverse-shipment can also be created as a draft, in which case the reverse-shipment is not submitted to the carrier until it is confirmed. This is useful if the tenant does not have all the information to create a valid reverse-shipment upfront.\n", "parameters": [ { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Draft Request", "properties": { "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_name": { "type": "string" }, "partner_location_code": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_code": { "type": "string" }, "partner_location_name": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attriutes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time" } }, "required": [ "references" ] } } ] } }, "/reverse-shipments/{shipment_id}": { "get": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } }, "404": { "description": "", "examples": { "application/json": { "status": "404", "timestamp": "2020-12-07T13:50:11.853Z", "errors": [ "No shipment found with the shipment id: KHNI57EYOAICSdf" ] } }, "schema": { "type": "object", "title": "Create shipment error response", "properties": { "timestamp": { "type": "string", "description": "date in format: \nyyyy-MM-dd'T'HH:mm:ss.SSSXXX" }, "errors": { "type": [ "string", "array" ], "description": "Array of validation errors", "items": { "type": "string" } } } } } }, "description": "This endpoint returns the latest reverse-shipment object including the most up-to-date status information.\n\nThe `shipment_id` is used as a path parameter to identify the reverse-shipment. Alternatively the client provided reverse-shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.", "summary": "Get Reverse Shipment", "tags": [ "reverse-shipment-api" ], "operationId": "get-reverse-shipment", "produces": [ "application/json" ], "consumes": [ "application/json" ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" } ] } }, "/reverse-shipments/{shipment_id}/reassign": { "patch": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Reassign Reverse Shipment", "tags": [ "reverse-shipment-api" ], "operationId": "reassign-reverse-shipment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "description": "This endpoint reassigns any unshipped reverse-shipments to a different carrier or can be used to simply retry any reverse-shipments that are in \"error\" state due to a failure on the carrier side.\n\nThe `shipment_id` is used as a path parameter to identify the reverse-shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`.\n\n* To retry the shipment, original carrier account object should be specified in request.\n* To reassign the shipment, target carrier account should be specified in the request.\n* If no carrier account object specified, the rules engine will trigger to find the best suitable one. \n* Otherwise, operation has no effect.\n", "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } } } ] }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/reverse-shipments/{shipment_id}/reprocess": { "put": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] } } }, "summary": "Reprocess Reverse Shipment", "operationId": "reprocess-reverse-shipment", "tags": [ "reverse-shipment-api" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-Type", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Request", "description": "This payload is being used to perform operations on a shipment.", "properties": { "merchant": { "type": "string", "description": "Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used." }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z" }, "language": { "description": "Must be a two letter ISO 639-1 code. Example: en", "enum": [ "ISO 639-1" ], "type": "string" }, "": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff" ] } } ], "description": "This endpoint is used to reprocess reverse-shipments that are in the \"error\" state due to validation failure on the carrier side. The entire reverse-shipment object is required to be passed in the request.\n\nThe `shipment_id` is used as a path parameter to identify the shipment. Alternatively the client provided shipment reference (`partner_shipment_reference`) can also be used instead of the `shipment_id`." }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] }, "/reverse-shipments/draft/{shipment_id}": { "patch": { "responses": { "200": { "description": "", "schema": { "type": "object", "title": "Shipment Draft Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" } }, "required": [ "references" ] } } }, "summary": "Update Draft Reverse Shipment", "operationId": "update-draft-reverse-shipment", "tags": [ "draft-reverse-shipment-api" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "parameters": [ { "in": "path", "name": "shipment_id", "type": "string", "required": true }, { "in": "header", "name": "tenant-id", "type": "string" }, { "in": "header", "name": "Content-type", "type": "string" }, { "in": "header", "name": "x-api-key", "type": "string" }, { "in": "body", "name": "body", "schema": { "type": "object", "title": "Shipment Request", "description": "This payload is being used to perform operations on a shipment.", "properties": { "merchant": { "type": "string", "description": "Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used." }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z" }, "language": { "description": "Must be a two letter ISO 639-1 code. Example: en", "enum": [ "ISO 639-1" ], "type": "string" }, "": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff" ] } } ], "description": "This endpoint updates draft reverse-shipment properties." }, "parameters": [ { "name": "shipment_id", "in": "path", "type": "string", "required": true } ] } }, "definitions": { "shipment-input": { "type": "object", "title": "Shipment Request", "description": "This payload is being used to perform operations on a shipment.", "properties": { "merchant": { "type": "string", "description": "Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used." }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z" }, "language": { "description": "Must be a two letter ISO 639-1 code. Example: en", "enum": [ "ISO 639-1" ], "type": "string" }, "": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff" ] }, "shipment-output": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] }, "parcel-input": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references-request": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "item": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] }, "pickup-request": { "type": "object", "title": "Pickup Request", "description": "Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff-request": { "type": "object", "description": "Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: `partner_location_id`, `partner_location_name`, `partner_location_code`.", "title": "Dropoff Request", "properties": { "partner_location_id": { "type": "string", "description": "only used to pass Carriyo internal location ID" }, "partner_location_name": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "partner_location_code": { "type": "string", "description": "pass either partner_location_name or partner_location_code" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string", "format": "Mandatory for SMSA" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string", "format": "Mandatory for SMSA" }, "country": { "type": "string" }, "coords": { "type": "array", "items": { "type": "number" } }, "type": { "type": "string" }, "notes": { "type": "string" }, "what3words": { "type": "string", "format": "///three.word.address" }, "personal_id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "parcel-output": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "shipment-draft-request": { "type": "object", "title": "Shipment Draft Request", "properties": { "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_name": { "type": "string" }, "partner_location_code": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_code": { "type": "string" }, "partner_location_name": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attriutes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time" } }, "required": [ "references" ] }, "shipment-draft-response": { "type": "object", "title": "Shipment Draft Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference" ], "title": "References Request", "description": "Tenant provided references for a shipment. The `partner_shipment_reference` is not mandatory but is expected to be unique. If `partner_shipment_reference` is not passed, then the `partner_order_reference` is used as the `partner_shipment_reference`. The `partner_shipment_reference` is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments." }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "custom_attributes": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" } }, "required": [ "references" ] }, "custom_attributes_request": { "type": "object", "description": "Merchant defined custom attributes in the form of a map:\n```\n{\"attribute1\" : [\"value1\", \"value2\"], \"attribute2\" : [\"value1\", \"value2\"]}\n```", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "title": "Custom Attributes Request" }, "return-collection": { "type": "object", "title": "Return Collection", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } } }, "return-payment": { "type": "object", "title": "Return Payment", "properties": { "total_amount": { "type": "number" }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "return-references": { "type": "object", "title": "Return References", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": "array", "items": { "type": "string" } } }, "required": [ "partner_order_reference", "partner_shipment_reference" ] }, "carrier-account-request": { "type": "object", "title": "Carrier Account Request", "description": "Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.", "properties": { "carrier_id": { "type": "string" }, "carrier_account_name": { "type": "string" } } }, "references-response": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "pickup-response": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff-response": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "pickup-draft-request": { "type": "object", "title": "Pickup Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_name": { "type": "string" }, "partner_location_code": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff-draft-request": { "type": "object", "title": "Dropoff Draft Request", "properties": { "partner_location_id": { "type": "string" }, "partner_location_code": { "type": "string" }, "partner_location_name": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "bulk-shipment-status-response": { "type": "object", "title": "Bulk Shipment Status Response", "properties": { "shipmentId": { "type": "string" }, "status": { "type": "object", "enum": [ "pending", "error", "booked", "ready-to-ship", "shipped", "out_for_delivery", "delivered", "cancelled", "failed_collection_attempt", "in_transit", "awaiting_customer_collection", "delivery_confirmed", "failed_delivery_attempt", "ready_for_return", "return_in_transit", "returned", "return_confirmed", "suspended", "missing", "delayed" ], "title": "Carriyo Response Status" }, "milestones": { "type": [ "string", "array" ], "description": "The list of all shipment statuses", "items": { "type": "object", "properties": { "status": { "type": "object", "enum": [ "pending", "error", "booked", "ready-to-ship", "shipped", "out_for_delivery", "delivered", "cancelled", "failed_collection_attempt", "in_transit", "awaiting_customer_collection", "delivery_confirmed", "failed_delivery_attempt", "ready_for_return", "return_in_transit", "returned", "return_confirmed", "suspended", "missing", "delayed" ], "title": "Carriyo Response Status" }, "date": { "type": "string" } } } } } }, "carriyo-response-status": { "type": "object", "enum": [ "pending", "error", "booked", "ready-to-ship", "shipped", "out_for_delivery", "delivered", "cancelled", "failed_collection_attempt", "in_transit", "awaiting_customer_collection", "delivery_confirmed", "failed_delivery_attempt", "ready_for_return", "return_in_transit", "returned", "return_confirmed", "suspended", "missing", "delayed" ], "title": "Carriyo Response Status" }, "update-parcels-request": { "type": "object", "title": "Update Parcels Request", "properties": { "parcels": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Request", "properties": { "partner_parcel_reference": { "type": "string" }, "parcel_id": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": "array", "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } } } }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "parcel-item": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } }, "personal id": { "type": "object", "title": "Personal ID", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "new-model": { "type": "object", "properties": {} }, "Reverse-shipment response": { "type": "object", "title": "Reverse Shipment Response", "properties": { "shipment_id": { "type": "string" }, "merchant": { "type": "string" }, "label": { "type": "object", "properties": { "generate_carriyo_label": { "type": "boolean" }, "override_carriyo_label": { "type": "boolean" }, "label_size": { "type": "string", "enum": [ "4x6", "4x8" ] }, "label_format": { "type": "string", "enum": [ "PDF", "ZPL" ] } }, "title": "Label" }, "carrier_account": { "type": "object", "title": "Carrier Account Response", "properties": { "carrier": { "type": "string", "enum": [ "FETCHR", "ARAMEX", "FODEL", "QUIQUP", "SHIPA", "NAQEL", "SMSA", "UPS", "VAAL", "FAREYE" ] }, "carrier_account_name": { "type": "string" }, "carrier_id": { "type": "string" } } }, "references": { "type": "object", "title": "References Response", "properties": { "partner_order_reference": { "type": "string" }, "partner_shipment_reference": { "type": "string" }, "alternate_reference": { "type": "string" }, "other_references": { "type": [ "string", "array" ], "items": { "type": "string" } } } }, "payment": { "type": "object", "description": "For the reverse-shipment `payment_mode` and `pending_amount` are not required and will be set to `PRE_PAID` and `0` accordingly. ", "properties": { "payment_mode": { "type": "string", "enum": [ "PRE_PAID", "CASH_ON_DELIVERY", "CARD_ON_DELIVERY" ] }, "pending_amount": { "type": "number", "format": "double", "minimum": 0 }, "total_amount": { "type": "number", "format": "double", "minimum": 0 }, "currency": { "type": "string" } }, "required": [ "total_amount", "currency" ] }, "delivery": { "type": "object", "properties": { "delivery_type": { "type": "string" }, "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "required": [ "delivery_type" ] }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "parcel_id": { "type": "string" }, "partner_parcel_reference": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "kg" ] } } }, "dimension": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" }, "depth": { "type": "number" }, "unit": { "type": "string" } } }, "parcel_items": { "type": [ "string", "array" ], "items": { "type": "object", "title": "Parcel Item", "properties": { "sku": { "type": "string" }, "quantity": { "type": "integer" } } } } } } }, "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "origin_country": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 }, "notes": { "type": "string" }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string" } } }, "weight": { "type": "object", "properties": { "value": { "type": "number" }, "unit": { "type": "string" } } }, "sku": { "type": "string" }, "hs_code": { "type": "string" }, "dangerous_goods": { "type": "boolean" } }, "required": [ "description", "quantity", "price", "sku" ] } }, "pickup": { "type": "object", "title": "Pickup Response", "properties": { "partner_location_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "contact_email": { "type": "string" }, "alternate_phone": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "type": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "dropoff": { "type": "object", "title": "Dropoff Response", "properties": { "partner_location_id": { "type": "string" }, "collection_point_id": { "type": "string" }, "contact_name": { "type": "string" }, "contact_phone": { "type": "string" }, "alternate_phone": { "type": "string" }, "contact_email": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postcode": { "type": "string" }, "country": { "type": "string" }, "coords": { "type": [ "string", "array" ], "items": { "type": "number" } }, "what3words": { "type": "string" }, "notes": { "type": "string" }, "personal_id": { "type": [ "string", "object" ], "properties": { "id": { "type": "string" }, "type": { "type": "string" } } } } }, "post_shipping_info": { "type": "object", "title": "Post Shipping Info", "properties": { "status": { "type": "string" }, "carrier_status": { "type": "string" }, "carrier_status_description": { "type": "string" }, "tracking_url": { "type": "string" }, "tracking_no": { "type": "string" }, "awb": { "type": "string" }, "carrier_awb": { "type": "string" }, "carriyo_pdf_label": { "type": "string" }, "carriyo_zpl_label": { "type": "string" }, "key_milestones": { "type": "object", "properties": { "pending": { "type": "string" }, "error": { "type": "string" }, "booked": { "type": "string" }, "cancelled": { "type": "string" }, "ready_to_ship": { "type": "string" }, "shipped": { "type": "string" }, "in_transit": { "type": "string" }, "out_for_delivery": { "type": "string" }, "delivered": { "type": "string" }, "awaiting_customer_collection": { "type": "string" }, "failed_delivery_attempt": { "type": "string" }, "ready_for_return": { "type": "string" }, "return_in_transit": { "type": "string" }, "returned": { "type": "string" }, "suspended": { "type": "string" }, "missing": { "type": "string" }, "delayed": { "type": "string" }, "return_confirmed": { "type": "string" } } }, "estimated_delivery_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" }, "estimated_ship_date": { "type": "string", "description": "Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z", "format": "date-time" } }, "required": [ "status" ] }, "custom_attributes": { "type": "object" }, "order_date": { "type": "string", "format": "date-time" }, "creation_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "collection": { "type": "object", "properties": { "scheduled_from": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_to": { "type": "string", "format": "date-time", "pattern": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, "scheduled_date": { "type": "string", "format": "date", "pattern": "yyyy-MM-dd" }, "scheduled_time_slot_id": { "type": "string" } }, "title": "Collection" }, "rma_id": { "type": "string" } }, "required": [ "references", "payment", "delivery", "items", "pickup", "dropoff", "post_shipping_info" ] }, "create-shipment-error-response": { "type": "object", "title": "Create shipment error response", "properties": { "timestamp": { "type": "string", "description": "date in format: \nyyyy-MM-dd'T'HH:mm:ss.SSSXXX" }, "errors": { "type": [ "string", "array" ], "description": "Array of validation errors", "items": { "type": "string" } } } } }, "securityDefinitions": { "API Key": { "type": "apiKey", "name": "x-api-key", "in": "header" }, "OAuth 2.0": { "type": "oauth2", "flow": "application", "tokenUrl": "https://auth.carriyo.com" } }, "schemes": [ "https" ], "security": [ { "API Key": [] }, { "OAuth 2.0": [] } ], "tags": [ { "name": "shipment-api" }, { "name": "web hook" }, { "name": "webhook" }, { "name": "reverse-shipment-api" }, { "name": "draft-shipment-api" }, { "name": "draft-reverse-shipment-api" } ], "x-stoplight": { "docs": { "includeDownloadLink": true } } }