Skip to content

Price

Use this endpoint to get shipment prices for selected products and quantities.

POST https://shipment.gelatoapis.com/v1/prices:search

Request example

$ curl -X POST "https://shipment.gelatoapis.com/v1/prices:search" \
    -H 'X-API-KEY: {{apiKey}}' \
    -H 'Content-Type: application/json' \
    -d '{
            "currency" : "USD",
            "country" : "US",
            "isBusiness" : true,
            "isPrivate" : true,
            "hasTracking" : true,
            "products" : [
                {
                    "productUid" : "cards_pf_bx_pt_110-lb-cover-uncoated_cl_4-4_hor",
                    "quantities" : [1]
                },
                {
                    "productUid" : "cards_pf_bx_pt_110-lb-cover-uncoated_cl_4-4_hor",
                    "quantities" : [1,5]
                }
            ]
        }'

Response example

{
    "prices": [
        {
            "productUid": "cards_pf_bx_pt_110-lb-cover-uncoated_cl_4-4_hor",
            "quantities": [
                {
                    "quantity": 1,
                    "pageCount": null,
                    "methods": [
                        {
                            "shipmentMethodUid": "ups_surepost",
                            "type": "normal",
                            "minPrice": 5.996,
                            "avgPrice": 7.700,
                            "minDays": 5,
                            "maxDays": 12
                        },
                        {
                            "shipmentMethodUid": "ups_next_day_commercial",
                            "type": "express",
                            "minPrice": 15.642,
                            "avgPrice": 30.851,
                            "minDays": 4,
                            "maxDays": 4
                        }
                    ]
                }
            ]
        },
        {
            "productUid": "cards_pf_bx_pt_110-lb-cover-uncoated_cl_4-4_hor",
            "quantities": [
                {
                    "quantity": 1,
                    "pageCount": null,
                    "methods": [
                        {
                            "shipmentMethodUid": "ups_surepost",
                            "type": "normal",
                            "minPrice": 5.996,
                            "avgPrice": 7.700,
                            "minDays": 5,
                            "maxDays": 12
                        },
                        {
                            "shipmentMethodUid": "ups_next_day_commercial",
                            "type": "express",
                            "minPrice": 15.642,
                            "avgPrice": 30.851,
                            "minDays": 4,
                            "maxDays": 4
                        }
                    ]
                },
                {
                    "quantity": 5,
                    "pageCount": null,
                    "methods": [
                        {
                            "shipmentMethodUid": "ups_surepost",
                            "type": "normal",
                            "minPrice": 5.996,
                            "avgPrice": 7.700,
                            "minDays": 5,
                            "maxDays": 12
                        },
                        {
                            "shipmentMethodUid": "ups_next_day_commercial",
                            "type": "express",
                            "minPrice": 15.642,
                            "avgPrice": 30.851,
                            "minDays": 4,
                            "maxDays": 4
                        }
                    ]
                }
            ]
        }
    ]
}

Parameters

Parameter Type Description
country (required) string Two-character ISO 3166-1 code that identifies the country or region.
currency (required) string The currency that the prices should be displayed in. The currency is defined by the Currency ISO code as per ISO 4217.
isBusiness (optional) bool Filter shipment methods on their suitability for shipping to business addresses.
isPrivate (optional) bool Filter shipment methods on their suitability for shipping to residential addresses.
hasTracking (optional) bool Filter shipment methods on tracking, i.e will you receive a tracking code and URL when the order is shipped with the shipment method.
products (required) ProductObject[] List of products.

ProductObject

Parameter Type Description
productUid (required) string Unique product identifier product uid.
pageCount (optional) integer The page count for multi-page products. This parameter is only needed for multi-page products (products with more than 4 pages). All pages in the product, including front and back cover are included in the count. For example for a Wire-o Notebook there are 112 inner pages (56 leaves) and 1 front and 1 back cover, total 114 pages. The pageCount is 114. Read more
quantities (required) integer[] The product quantities array. Define how many copies of product should be printed. The minimum value is 1

Response Parameters

Parameter Type Description
prices (required) PriceObject[] Array of price objects.

PriceObject

Parameter Type Description
productUid (required) string Product Uid.
quantities (required) QuantityObject[] Array of Quantity objects.

QuantityObject

Parameter Type Description
quantity (required) integer Quantity of the product
pageCount (required) integer Page count for multi-page products.
methods (required) MethodObject[] Array of Method objects.

MethodObject

Parameter Type Description
shipmentMethodUid (required) string Method Uid.
type (required) string Shipping service type. Can be: normal, express or pallet.
minPrice (required) float The cheapest shipping price in the country for the shipment method. The price is displayed in the currency that the currency parameter was set to.
avgPrice (required) float The average shipping price in the country for the shipment method. The price is displayed in the currency that the currency parameter was set to.
minDays (required) integer The estimated minimum days to produce and deliver the product. Gives the estimate in total number of days including weekends and holidays. Example: minDays estimate is 3 days and it is given on a Friday. It means that the earliest delivery is on Monday (3 days later).
maxDays (required) integer The estimated maximum days to produce and deliver the product. Gives the estimate in total number of days including weekends and holidays. Example: maxDays estimate is 8 days and it is given on a Thursday. It means that the earliest delivery is on the next Friday (8 days later).