### Update Shipping Rule Example Source: https://developers.easyship.com/reference/shipping_rules_update This example demonstrates how to successfully update a shipping rule, including modifying conditions and actions. Ensure you have the correct rule ID and valid condition/action configurations. ```json { "name": "Updated Shipping Rule", "recalculate_shipments": true, "conditions": [ { "id": "01563646-58c1-4607-8fe0-cae3e33c0002", "type": "match_zipcode", "options": { "operator": "is_any_of", "zipcodes": [ "CA-123456" ] } } ], "actions": [ { "id": "01563646-58c1-4607-8fe0-cae3e33c0004", "type": "add_preferred_courier_service", "options": { "preferred_courier_service_ids": [ "01563646-58c1-4607-8fe0-cae3e33c0001", "01563646-58c1-4607-8fe0-cae3e33c0002" ] } } ] } ``` -------------------------------- ### Shipping Rule Update Example Source: https://developers.easyship.com/reference/shipping_rules_update-1 Example JSON payload for successfully updating a shipping rule, including conditions and actions. ```json { "name": "Updated Shipping Rule", "recalculate_shipments": true, "conditions": [ { "id": "01563646-58c1-4607-8fe0-cae3e33c0002", "type": "match_zipcode", "options": { "operator": "is_any_of", "zipcodes": [ "CA-123456" ] } } ], "actions": [ { "id": "01563646-58c1-4607-8fe0-cae3e33c0004", "type": "add_never_courier_service", "options": { "never_courier_service_ids": [ "01563646-58c1-4607-8fe0-cae3e33c0001", "01563646-58c1-4607-8fe0-cae3e33c0002", "01563646-58c1-4607-8fe0-cae3e33c0003" ] } } ] } ``` -------------------------------- ### TrackingCreate API Source: https://developers.easyship.com/reference/trackings_create This endpoint allows you to create a new tracking record. You must provide either a `courier_service_id` or a `courier_service_name`. If `courier_service_id` is provided, `courier_service_name` is ignored. For external courier services not supported by Easyship label generation, retrieve the service name using `GET /trackings/external_courier_services`. ```APIDOC ## POST /trackings ### Description Creates a new tracking record for a shipment. ### Method POST ### Endpoint /trackings ### Parameters #### Request Body - **tracking_number** (string) - Required - The tracking number provided by the courier. - **courier_service_id** (string, uuid) - Optional - Unique identifier for a courier service. - **courier_service_name** (string) - Optional - Name of the courier service. Required if `courier_service_id` is not provided. - **platform_order_number** (string) - Optional - The order number from the e-commerce platform. - **origin_address_id** (string, uuid) - Optional - ID of the origin address. Required if `origin_address` is not provided. - **origin_address** (object) - Optional - Details of the origin address. Ignored if `origin_address_id` is provided. - **line_1** (string) - Required - The first line of the address. - **line_2** (string) - Optional - The second line of the address. - **city** (string) - Required - The city. - **state** (string) - Required - The state or province. - **postal_code** (string) - Required - The postal code. - **country_code** (string) - Required - The ISO 3166-1 alpha-2 country code. - **contact_name** (string) - Required - The name of the contact person. - **contact_email** (string) - Required - The email address of the contact person. - **contact_phone** (string) - Required - The phone number of the contact person. - **destination_address** (object) - Required - Details of the destination address. - **line_1** (string) - Required - The first line of the address. - **line_2** (string) - Optional - The second line of the address. - **city** (string) - Required - The city. - **state** (string) - Required - The state or province. - **postal_code** (string) - Required - The postal code. - **country_code** (string) - Required - The ISO 3166-1 alpha-2 country code. - **contact_name** (string) - Required - The name of the contact person. - **contact_email** (string) - Required - The email address of the contact person. - **contact_phone** (string) - Required - The phone number of the contact person. - **items** (array) - Optional - A list of items included in the shipment. - **description** (string) - Required - Description of the item. - **quantity** (number) - Optional - Quantity of the item. Defaults to 1. ### Request Example ```json { "tracking_number": "1Z999AA10123456784", "courier_service_name": "UPS Ground", "destination_address": { "line_1": "123 Main St", "city": "Anytown", "state": "CA", "postal_code": "90210", "country_code": "US", "contact_name": "John Doe", "contact_email": "john.doe@example.com", "contact_phone": "123-456-7890" }, "items": [ { "description": "T-shirt", "quantity": 2 } ] } ``` ### Response #### Success Response (200) - **tracking_number** (string) - The tracking number. - **status** (string) - The current status of the tracking. - **status_history** (array) - A list of historical tracking statuses. - **tracking_page_url** (string) - URL to the tracking page. - **eta_date** (string, date-time) - Estimated time of arrival. #### Response Example ```json { "tracking_number": "1Z999AA10123456784", "status": "Label Created", "status_history": [ { "status": "Label Created", "timestamp": "2023-10-27T10:00:00Z" } ], "tracking_page_url": "https://www.easyship.com/tracking/1Z999AA10123456784", "eta_date": "2023-11-03T00:00:00Z" } ``` ``` -------------------------------- ### Invalid Request Error Example Source: https://developers.easyship.com/reference/shipping_rules_update This JSON structure represents an invalid request error, indicating a permission issue. It includes details like the error code, type, a human-readable message, and a request ID for tracking. ```json { "error": { "code": "forbidden", "details": [], "links": [ { "kind": "documentation", "name": "Errors", "url": "https://developers.easyship.com/reference/errors" }, { "kind": "documentation", "name": "Scopes", "url": "https://developers.easyship.com/reference/scopes" }, { "kind": "documentation", "name": "Update a Shipping Rule", "url": "https://developers.easyship.com/reference/shipping_rules_update" }, { "kind": "how-to-guide", "name": "How to Automate your Shipments", "url": "https://developers.easyship.com/docs/how-to-automate-your-shipments" } ], "message": "You do not have permission to access this resource. Please contact our support team or your account manager if you believe you should have access.", "request_id": "01563646-58c1-4607-8fe0-cae3e92c4477", "type": "invalid_request_error" } } ``` -------------------------------- ### GET /trackings Source: https://developers.easyship.com/reference/trackings_show Retrieves tracking information for a shipment. This endpoint returns a single tracking object with associated metadata. ```APIDOC ## GET /trackings ### Description Retrieves tracking details for a specific shipment. ### Method GET ### Endpoint /trackings ### Response #### Success Response (200) - **tracking** (object) - The tracking details object. - **meta** (object) - Metadata including the request_id. #### Error Response (404) - **error** (object) - Contains error code, type, message, request_id, and helpful links to documentation. ``` -------------------------------- ### Ship From Configuration Source: https://developers.easyship.com/reference/shipping_rules_show Schema for forcing a specific origin address for a shipment. ```APIDOC ## Ship From Configuration ### Description Defines the structure for forcing a shipment to originate from a specific address. ### Request Body - **type** (string) - Required - Must be "force_ship_from" - **options** (object) - Required - Configuration options - **origin_address_id** (string, uuid) - Required - Address ID based on Address API. ``` -------------------------------- ### Developer Resources Links Source: https://developers.easyship.com/reference/shipping_rules_update Provides links to different types of Easyship developer documentation. ```APIDOC ## GET /websites/developers_easyship_reference ### Description Retrieves links to Easyship developer resources. ### Method GET ### Endpoint /websites/developers_easyship_reference ### Response #### Success Response (200) - **items** (object) - Contains details about Easyship documentation. - **name** (string) - Name of Easyship documentation. - **url** (string) - URL to Easyship documentation. - **kind** (string) - The kind of Easyship documentation. - **details** (array) - An array of human-readable messages providing detailed information about the error. - **request_id** (string) - An unique ID representing the request. #### Response Example ```json { "items": { "name": "Easyship API Guide", "url": "https://developers.easyship.com/api", "kind": "api_documentation" }, "details": null, "request_id": "req_12345abcde" } ``` ``` -------------------------------- ### ActionRejectPackagesCreate Source: https://developers.easyship.com/reference/shipping_rules_update Schema for creating a 'Reject Packages' action. ```APIDOC ## ActionRejectPackagesCreate Schema ### Description Defines the structure for rejecting packages. ### Schema ```json { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } } ``` ``` -------------------------------- ### ActionForcePackageCreate Source: https://developers.easyship.com/reference/shipping_rules_update-1 Use a specific package type for shipping. ```APIDOC ## ActionForcePackageCreate ### Description Use a specific box or flat rate box for the shipment. ### Request Body - **type** (string) - Required - Must be 'force_package' - **options** (object) - Required - **force_box_id** (string, uuid) - Optional - Box ID for type 'box' - **force_flat_rate_box_id** (string, uuid) - Optional - Box ID for type 'flat_rate_box' ### Request Example { "type": "force_package", "options": { "force_box_id": "550e8400-e29b-41d4-a716-446655440000" } } ``` -------------------------------- ### ActionForcePackageCreate Source: https://developers.easyship.com/reference/shipping_rules_update This action allows you to specify a package for the shipment, either a standard box or a flat-rate box, using its unique ID. ```APIDOC ## POST /api/actions/force_package ### Description Specifies a package to be used for the shipment. ### Method POST ### Endpoint /api/actions/force_package ### Request Body - **type** (string) - Required - Must be 'force_package'. - **options** (object) - Required - Contains package options. Must include either `force_box_id` or `force_flat_rate_box_id`. - **force_box_id** (string) - Required (if not using `force_flat_rate_box_id`) - The UUID of the box to use. Box type is 'box'. - **force_flat_rate_box_id** (string) - Required (if not using `force_box_id`) - The UUID of the flat-rate box to use. Box type is 'flat_rate_box'. ``` -------------------------------- ### ActionForceIncotermsCreate Source: https://developers.easyship.com/reference/shipping_rules_update Schema for creating a 'Force Incoterms' action. ```APIDOC ## ActionForceIncotermsCreate Schema ### Description Defines the structure for forcing a specific Incoterm for a shipment. ### Schema ```json { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } } ``` ``` -------------------------------- ### ActionForcePackage Source: https://developers.easyship.com/reference/shipping_rules_show Schema for forcing a package in an action, including its creation details and a unique ID. ```APIDOC ## ActionForcePackage ### Description Represents an action to force a specific package. ### Response Body - **id** (string, uuid) - The unique identifier for this action. ### Response Example ```json { "id": "a7b8c9d0-e1f2-3456-7890-abcdef123456" } ``` ``` -------------------------------- ### POST /trackings Source: https://developers.easyship.com/reference/trackings_create Creates a single tracking in your Easyship account. This endpoint requires the `public.track_3p:write` authorization scope and an updated contract with Easyship. ```APIDOC ## POST /trackings ### Description Creates a single tracking in your account. ### Method POST ### Endpoint /trackings ### Authorization Required scope: `public.track_3p:write` ### Prerequisites This API requires an updated contract with Easyship. Contact your account manager or the Easyship Support Team. ### Usage Notes Calls to this endpoint count towards your API usage allowance. Monitor your current usage in the [Subscription section](https://app.easyship.com/account/subscription) of your account. ``` -------------------------------- ### ActionForceTrackingRatingCreate Source: https://developers.easyship.com/reference/shipping_rules_update Schema for creating a 'Force Tracking Rating' action. ```APIDOC ## ActionForceTrackingRatingCreate Schema ### Description Defines the structure for forcing a specific tracking rating. ### Schema ```json { "type": "object", "properties": { "id": { "type": "string", "format": "string" } } } ``` ``` -------------------------------- ### ActionForceShipFromCreate Source: https://developers.easyship.com/reference/shipping_rules_update Schema for creating a 'Force Ship From' action. ```APIDOC ## ActionForceShipFromCreate Schema ### Description Defines the structure for forcing a specific 'ship from' location. ### Schema ```json { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } } ``` ``` -------------------------------- ### Currency Reference Source: https://developers.easyship.com/reference/shipments_create This section lists all supported currency codes and their descriptions. ```APIDOC ## Currency Reference ### Description This section lists all supported currency codes and their descriptions. ### Supported Currencies - AED - AFN - ALL - AMD - ANG - AOA - ARS - AUD - AWG - AZN - BAM - BBD - BDT - BGN - BHD - BIF - BMD - BND - BOB - BRL - BSD - BTN - BWP - BYR - BZD - CAD - CDF - CHF - CLF - CLP - CNY - COP - CRC - CUC - CUP - CVE - CZK - DJF - DKK - DOP - DZD - EGP - ERN - ETB - EUR - FJD - FKP - GBP - GEL - GHS - GIP - GMD - GNF - GTQ - GYD - HKD - HNL - HRK - HTG - HUF - IDR - ILS - INR - IQD - IRR - ISK - JMD - JOD - JPY - KES - KGS - KHR - KMF - KPW - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LTL - LVL - LYD - MAD - MDL - MGA - MKD - MMK - MNT - MOP - MRO - MUR - MVR - MWK - MXN - MYR - MZN - NAD - NGN - NIO - NOK - NPR - NZD - OMR - PAB - PEN - PGK - PHP - PKR - PLN - PYG - QAR - RON - RSD - RUB - RWF - SAR - SBD - SCR - SDG - SEK - SGD - SHP - SKK - SLL - SOS - SRD - SSP - STD - SVC - SYP - SZL - THB - TJS - TMT - TND - TOP - TRY - TTD - TWD - TZS - UAH - UGX - USD - UYU - UZS - VES - VND - VUV - WST - XAF - XAG - XAU - XCD - XDR - XOF - XPF - YER - ZAR - ZMW - BTC - JEP - EEK - GHC - MTL - TMM - YEN - ZWD - ZWL - ZWN - ZWR ### Example ```json "USD" ``` ### Description ISO-4217 three-letter alphabetic currency code (e.g. USD, EUR, GBP) ``` -------------------------------- ### Automated Return Configuration Source: https://developers.easyship.com/reference/shipping_rules_show Schema for enabling automated return labels for domestic shipments. ```APIDOC ## Automated Return Configuration ### Description Defines the structure for requesting automated return labels for domestic shipments. ### Request Body - **type** (string) - Required - Must be "force_automated_return_requested" - **options** (object) - Required - Configuration options - **force_automated_return_requested** (boolean) - Required - Toggle for automated return. ``` -------------------------------- ### ActionForceResidentialSurchargeCreate Source: https://developers.easyship.com/reference/shipping_rules_update Schema for creating a 'Force Residential Surcharge' action. ```APIDOC ## ActionForceResidentialSurchargeCreate Schema ### Description Defines the structure for forcing a residential surcharge. ### Schema ```json { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } } ``` ``` -------------------------------- ### Products API Source: https://developers.easyship.com/reference/shipping_rules_show-1 Endpoints for managing product information. Supports read and write operations. ```APIDOC ## GET /api/products ### Description Retrieves a list of products. ### Method GET ### Endpoint /api/products ### Response #### Success Response (200) - **products** (array) - A list of product objects. #### Response Example ```json { "products": [ { "id": "prod_123", "name": "Example Product" } ] } ``` ``` ```APIDOC ## POST /api/products ### Description Creates a new product. ### Method POST ### Endpoint /api/products ### Request Body - **name** (string) - Required - The name of the product. - **sku** (string) - Required - The Stock Keeping Unit for the product. ### Request Example ```json { "name": "New Product", "sku": "NEWPROD001" } ``` ### Response #### Success Response (201) - **id** (string) - The ID of the newly created product. - **name** (string) - The name of the newly created product. - **sku** (string) - The SKU of the newly created product. #### Response Example ```json { "id": "prod_456", "name": "New Product", "sku": "NEWPROD001" } ``` ``` -------------------------------- ### Force Package Source: https://developers.easyship.com/reference/shipping_rules_show-1 This action allows you to specify a particular box to be used for the shipment. You can either force a standard box or a flat-rate box by providing its ID. ```APIDOC ## POST /api/actions/force_package ### Description Forces a specific box to be used for the shipment. ### Method POST ### Endpoint /api/actions/force_package ### Request Body - **type** (string) - Required - Must be `force_package`. - **options** (object) - Required - Contains the options for forcing a package. - **force_box_id** (string) - Optional - UUID of the box to force. Box type is 'box'. - **force_flat_rate_box_id** (string) - Optional - UUID of the flat rate box to force. Box type is 'flat_rate_box'. ### Request Example ```json { "type": "force_package", "options": { "force_box_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Package forced successfully." } ``` ``` -------------------------------- ### ActionForceSortByCreate Source: https://developers.easyship.com/reference/shipping_rules_update Schema for creating a 'Force Sort By' action. ```APIDOC ## ActionForceSortByCreate Schema ### Description Defines the structure for forcing a specific sorting method for shipments. ### Schema ```json { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } } ``` ``` -------------------------------- ### Condition Match State Create Source: https://developers.easyship.com/reference/shipping_rules_update-1 Defines a condition to match orders based on their destination state. Requires a type and options including a list of state identifiers. ```APIDOC ## Condition Match State Create ### Description Condition that matches the destination state of the orders. ### Properties - **type** (string, enum: ["match_state"]) - Required. Specifies the type of condition as 'match_state'. - **options** (object) - Required. Contains matching options. - **states** (array) - Required. Minimum 1 item. List of country ID + state abbr based on State API. Example: "39-AB". ``` -------------------------------- ### Ship From Action Source: https://developers.easyship.com/reference/shipping_rules_update Defines the 'force_ship_from' action, allowing you to specify an origin address for shipments. ```APIDOC ## POST /api/shipments/actions ### Description This endpoint allows you to apply actions to a shipment, such as forcing a specific ship-from address. ### Method POST ### Endpoint /api/shipments/actions ### Request Body - **actions** (array) - Required - A list of actions to apply to the shipment. - **type** (string) - Required - The type of action. Must be "force_ship_from". - **options** (object) - Required - Options for the force ship from action. - **origin_address_id** (string) - Required - The ID of the origin address. ### Request Example ```json { "actions": [ { "type": "force_ship_from", "options": { "origin_address_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } } ] } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Shipment actions applied successfully." } ``` ``` -------------------------------- ### ConditionMatchWeightCreate Schema Source: https://developers.easyship.com/reference/shipping_rules_show-1 Defines the schema for creating a condition that matches an order's weight. ```APIDOC ## ConditionMatchWeightCreate ### Description Condition that matches order weight. ### Request Body - **type** (string) - Required - Must be "match_weight" - **options** (object) - Required - Configuration for the weight match - **operator** (string) - Required - Comparison operator (greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to) - **total_actual_weight** (number) - Required - Weight in LB or KG based on country setting ``` -------------------------------- ### Settings API Source: https://developers.easyship.com/reference/shipping_rules_show-1 Endpoints for managing account settings. Supports read and write operations. ```APIDOC ## GET /api/settings ### Description Retrieves the account settings. ### Method GET ### Endpoint /api/settings ### Response #### Success Response (200) - **settings** (object) - An object containing the account settings. #### Response Example ```json { "settings": { "default_currency": "USD", "language": "en" } } ``` ``` ```APIDOC ## PUT /api/settings ### Description Updates the account settings. ### Method PUT ### Endpoint /api/settings ### Request Body - **default_currency** (string) - Optional - The default currency for the account. - **language** (string) - Optional - The preferred language for the account. ### Request Example ```json { "default_currency": "EUR", "language": "es" } ``` ### Response #### Success Response (200) - **settings** (object) - The updated account settings. #### Response Example ```json { "settings": { "default_currency": "EUR", "language": "es" } } ``` ``` -------------------------------- ### ActionForcePackageCreate Source: https://developers.easyship.com/reference/shipping_rules_show Defines an action to force the use of a specific package type. ```APIDOC ## ActionForcePackageCreate ### Description Use a specific package for the shipment. ### Request Body - **type** (string) - Required - Must be "force_package" - **options** (object) - Required - Configuration options - **force_box_id** (string) - Optional - Box ID for 'box' type - **force_flat_rate_box_id** (string) - Optional - Box ID for 'flat_rate_box' type ### Request Example { "type": "force_package", "options": { "force_box_id": "uuid-string" } } ``` -------------------------------- ### ActionForceIncotermsCreate Source: https://developers.easyship.com/reference/shipping_rules_show This action allows you to force specific Incoterms for shipments, affecting how taxes and duties are handled. ```APIDOC ## ActionForceIncotermsCreate ### Description Taxes & duties. ### Method POST ### Endpoint /api/actions ### Parameters #### Request Body - **type** (string) - Required - Must be "force_incoterms" - **options** (object) - Required - Configuration for the action - **incoterms** (string) - Required - Specifies the Incoterms for the shipment. - Possible values: "DDP" (Pre-paid), "DDU" (Post-paid), "DDU_and_Best_DDP" (Offer 3 post-paid and 1 pre-paid shipping options), "DDP_and_Best_DDU" (Offer 1 post-paid and 3 pre-paid shipping options). ``` -------------------------------- ### Condition Match All Create Source: https://developers.easyship.com/reference/shipping_rules_update-1 Represents a condition that matches all orders. It requires a type field set to 'match_all'. ```APIDOC ## Condition Match All Create ### Description Condition that matches all orders. ### Properties - **type** (string, enum: ["match_all"]) - Required. Specifies the type of condition as 'match_all'. ``` -------------------------------- ### POST /trackings Source: https://developers.easyship.com/reference/trackings_create Creates a new tracking record for a shipment. ```APIDOC ## POST /trackings ### Description Creates a new tracking record for a shipment by providing tracking number, courier service ID, and address details. ### Method POST ### Endpoint /trackings ### Request Body - **tracking_number** (string) - Required - The tracking number of the shipment. - **courier_service_id** (string) - Required - The ID of the courier service. - **destination_address** (object) - Required - The destination address details. - **origin_address** (object) - Required - The origin address details. - **items** (array) - Optional - List of items in the shipment. ### Request Example { "tracking_number": "13213213", "courier_service_id": "01563646-58c1-4607-8fe0-cae3e33c0002", "destination_address": { "company_name": "Test Plc.", "contact_name": "Foo Bar", "contact_email": "asd@asd.com", "contact_phone": "+65 6910 1185", "line_1": "123 Test Street", "line_2": "Block 3", "postal_code": "247964", "city": "Singapore", "state": "Singapore", "country_alpha2": "SG" }, "items": [ { "description": "iPhone", "quantity": 1 }, { "description": "Macbook" } ], "origin_address": { "company_name": "Test Plc.", "contact_name": "Foo Bar", "contact_email": "asd@asd.com", "contact_phone": "+852-1234-5678", "line_1": "123 Test Street", "line_2": "Block 3", "postal_code": "ABC123", "city": "City", "state": "State", "country_alpha2": "SG" } } ``` -------------------------------- ### ConditionMatchSellingPriceCreate Schema Source: https://developers.easyship.com/reference/shipping_rules_show-1 Defines the schema for creating a condition that matches an order's selling price. ```APIDOC ## ConditionMatchSellingPriceCreate ### Description Condition that matches order's selling price. ### Request Body - **type** (string) - Required - Must be "match_selling_price" - **options** (object) - Required - Configuration for the price match - **operator** (string) - Required - Comparison operator (greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to) - **value** (number) - Required - Selling price - **currency** (string) - Required - Currency code ``` -------------------------------- ### ActionForceInsuranceCreate Source: https://developers.easyship.com/reference/shipping_rules_update Schema for creating a 'Force Insurance' action. ```APIDOC ## ActionForceInsuranceCreate Schema ### Description Defines the structure for forcing insurance on a shipment. ### Schema ```json { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" } } } ``` ``` -------------------------------- ### ActionForceSortByCreate Source: https://developers.easyship.com/reference/shipping_rules_show This action allows you to define the sorting criteria for courier services. ```APIDOC ## ActionForceSortByCreate ### Description Sort couriers by total_charge, delivery_time_rank or value_for_money_rank. ### Method POST ### Endpoint /api/actions ### Parameters #### Request Body - **type** (string) - Required - Must be "force_sort_by" - **options** (object) - Required - Configuration for the action - **sort_by** (string) - Required - The criteria to sort couriers by. - Possible values: "total_charge" (Cheapest), "delivery_time_rank" (Fastest), "value_for_money_rank" (Best value for money). ``` -------------------------------- ### ActionForceSortByCreate Source: https://developers.easyship.com/reference/shipping_rules_update-1 This action allows you to force a specific sorting order for courier services. ```APIDOC ## ActionForceSortByCreate ### Description Sort couriers by total_charge, delivery_time_rank or value_for_money_rank. ### Method Not applicable (Schema definition) ### Endpoint Not applicable (Schema definition) ### Parameters #### Request Body - **type** (string) - Required - Must be "force_sort_by". - **options** (object) - Required - Configuration for the action. - **sort_by** (string) - Required - Specifies the criteria for sorting couriers. - Allowed values: "total_charge", "delivery_time_rank", "value_for_money_rank". - "total_charge": Cheapest - "delivery_time_rank": Fastest - "value_for_money_rank": Best value for money ### Request Example ```json { "type": "force_sort_by", "options": { "sort_by": "total_charge" } } ``` ### Response #### Success Response (200) - **id** (string, format: uuid) - The unique identifier for the action. #### Response Example ```json { "id": "uuid-of-the-action" } ``` ``` -------------------------------- ### ActionForceAutomatedReturnRequestedCreate Source: https://developers.easyship.com/reference/shipping_rules_update-1 This action allows for the creation of return labels for domestic shipments by forcing an automated return request. ```APIDOC ## ActionForceAutomatedReturnRequestedCreate ### Description Allows for the creation of return labels for domestic shipments by forcing an automated return request. ### Method POST ### Endpoint /api/actions/force_automated_return_requested ### Parameters #### Request Body - **type** (string) - Required - Must be 'force_automated_return_requested'. - **options** (object) - Required - Contains options for the action. - **force_automated_return_requested** (boolean) - Required - Specifies whether to force the automated return. ### Request Example ```json { "type": "force_automated_return_requested", "options": { "force_automated_return_requested": true } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Automated return requested successfully." } ``` ``` -------------------------------- ### ActionForceShipFromCreate Source: https://developers.easyship.com/reference/shipping_rules_update-1 Specify the origin address for the shipment. ```APIDOC ## ActionForceShipFromCreate ### Description Specify the origin address ID for the shipment. ### Request Body - **type** (string) - Required - Must be 'force_ship_from' - **options** (object) - Required - **origin_address_id** (string, uuid) - Required - The ID of the origin address ### Request Example { "type": "force_ship_from", "options": { "origin_address_id": "550e8400-e29b-41d4-a716-446655440000" } } ``` -------------------------------- ### Currency Information Source: https://developers.easyship.com/reference/shipping_rules_update This section details the available currency codes and their properties. ```APIDOC ## Currency Object ### Description Represents currency information, including ISO-4217 codes and supported values. ### Properties - **Currency** (string) - Required - ISO-4217 three-letter alphabetic currency code (e.g. USD, EUR, GBP). - **Enum**: [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SKK", "SLL", "SOS", "SRD", "SSP", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "BTC", "JEP", "EEK", "GHC", "MTL", "TMM", "YEN", "ZWD", "ZWL", "ZWN", "ZWR"] - **Example**: "USD" ### ConditionMatchCountry Object ### Description Represents a country used for condition matching, including its ID. ### Properties - **id** (string) - Required - Unique identifier for the country (UUID format). ### Request Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### ActionRejectPackages Source: https://developers.easyship.com/reference/shipping_rules_show Schema for rejecting packages in an action, including its creation details and a unique ID. ```APIDOC ## ActionRejectPackages ### Description Represents an action to reject packages. ### Response Body - **id** (string, uuid) - The unique identifier for this action. ### Response Example ```json { "id": "b8c9d0e1-f2a3-4567-8901-bcdef1234567" } ``` ``` -------------------------------- ### Condition Match Category Create Source: https://developers.easyship.com/reference/shipping_rules_update-1 Defines a condition to match orders containing specific product categories. Requires a type and options including a list of category IDs. ```APIDOC ## Condition Match Category Create ### Description Condition that matches orders containing specific categories. ### Properties - **type** (string, enum: ["match_category"]) - Required. Specifies the type of condition as 'match_category'. - **options** (object) - Required. Contains matching options. - **category_ids** (array) - Required. Minimum 1 item. List of category IDs based on Category API. ``` -------------------------------- ### ActionForceResidentialSurchargeCreate Source: https://developers.easyship.com/reference/shipping_rules_show Defines an action to declare the destination address as residential. ```APIDOC ## ActionForceResidentialSurchargeCreate ### Description Declare destination address as residential. ### Request Body - **type** (string) - Required - Must be "force_residential_surcharge" - **options** (object) - Required - Configuration options - **set_as_residential** (boolean) - Required - Whether to set as residential ### Request Example { "type": "force_residential_surcharge", "options": { "set_as_residential": true } } ``` -------------------------------- ### Shipment Settings Configuration Source: https://developers.easyship.com/reference/shipments_create Details on the available parameters for configuring shipping settings, including courier selection, label purchasing, and printing options. ```APIDOC ## Shipment Settings Configuration ### Description This section defines the configuration object for shipment settings, including courier selection for LYOC, shipping rules, and label generation preferences. ### Request Body - **courier_umbrella** (string) - Optional - (support LYOC couriers only) The umbrella name of the courier service (e.g., "FedEx"). If provided, `courier_service_name` and `courier_account_number` must also be included. - **courier_service_name** (string) - Optional - (support LYOC couriers only) The official name of the courier service. If provided, `courier_umbrella` and `courier_account_number` must also be included. - **courier_account_number** (string) - Optional - (support LYOC couriers only) The account number of the courier account. If provided, `courier_umbrella` and `courier_service_name` must also be included. - **allow_fallback** (boolean) - Optional - If `courier_service_id` is provided but the courier can’t be selected, allow the shipment to be created and the next best rate to be selected. Default: `false`. - **apply_shipping_rules** (boolean) - Optional - Apply any shipping rules created on the Easyship dashboard. Default: `true`. - **list_unavailable_services** (boolean) - Optional - Setting this option will return detailed information with reasons for each courier in the response. - **buy_label** (boolean) - Optional - Create a shipment and buy the label in a single API call. Default: `false`. - **buy_label_synchronous** (boolean) - Optional - Generate a label synchronously. Returns a label in the response. Default: `false`. ### Printing Options - **format** (string) - Optional - Options: `png`, `pdf`, `url`, `zpl`. Default: `png`. - **label** (string) - Optional - Label page size. Options: `4x6`, `A4`, `A5`. Default: `4x6`. ``` -------------------------------- ### ConditionMatchPlatformCreate Source: https://developers.easyship.com/reference/shipping_rules_create Defines a condition to match shipping rules based on platform names. ```APIDOC ## POST /api/shipping/rules/conditions/platform ### Description Creates a condition to match shipping rules based on platform names. ### Method POST ### Endpoint /api/shipping/rules/conditions/platform ### Request Body - **type** (string) - Required - Must be "match_platform_name". - **options** (object) - Required - Contains the platform names to match. - **platform_names** (array of strings) - Required - List of platform name base on Shipping Rule Platform API. ### Request Example ```json { "type": "match_platform_name", "options": { "platform_names": ["example_platform_1", "example_platform_2"] } } ``` ### Response #### Success Response (200) - **type** (string) - The type of condition. - **options** (object) - The options for the condition. - **platform_names** (array of strings) - List of platform names. #### Response Example ```json { "type": "match_platform_name", "options": { "platform_names": ["example_platform_1", "example_platform_2"] } } ``` ``` -------------------------------- ### ConditionMatchPlatformName Source: https://developers.easyship.com/reference/shipping_rules_update-1 Represents a condition that matches a specific platform name. ```APIDOC ## ConditionMatchPlatformName ### Description Represents a condition that matches shipments from a specific platform name. ### Method N/A (Schema definition) ### Endpoint N/A (Schema definition) ### Parameters #### Request Body (Example Structure) - **id** (string, uuid) - Optional - Unique identifier for the condition. ### Request Example ```json { "id": "a7b8c9d0-e1f2-3456-7890-abcdef123456" } ``` ### Response #### Success Response (200) - **id** (string, uuid) - Unique identifier for the condition. #### Response Example ```json { "id": "a7b8c9d0-e1f2-3456-7890-abcdef123456" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.