Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v:2.0:shipping:payload [2020/01/13 17:27] – marija | v:2.0:shipping:payload [2020/09/25 00:08] (current) – adding customer attributes to the example foxybrett | ||
---|---|---|---|
Line 5: | Line 5: | ||
<code javascript> | <code javascript> | ||
{ | { | ||
- | | + | |
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
}, | }, | ||
- | " | + | |
- | " | + | " |
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
{ | { | ||
- | | + | |
- | }, | + | "href": "https:// |
- | | + | "templated": |
- | "fx: | + | } |
- | " | + | ], |
- | | + | "self": |
- | "admin_email_template_uri": | + | "href": "https:// |
- | "customer_email_template_uri": | + | "title": "This Item" |
- | "code": "flat", | + | }, |
- | " | + | "fx:store": |
- | "item_delivery_type": "flat_rate", | + | "href": "https:// |
- | " | + | "title": "This Store" |
- | " | + | }, |
- | " | + | "fx:cart": |
- | "default_weight_unit": "LBS", | + | "href": "https:// |
- | " | + | "title": "This Cart" |
- | "shipping_flat_rate_type": "per_order", | + | }, |
- | " | + | "fx:item_category": { |
- | " | + | "href": "https:// |
- | " | + | "title": "This Item Category" |
- | "handling_fee_minimum": | + | }, |
- | " | + | "fx:item_options": |
- | | + | "href": " |
- | "discount_type": "", | + | "title": "Item Options for This Item" |
- | " | + | }, |
- | "discount_details": "allunits|250-90", | + | "fx:attributes": |
- | " | + | "href": "https:// |
- | "send_admin_email": "" | + | "title": "Attributes for This Item" |
- | " | + | }, |
- | " | + | "fx: |
- | " | + | "href": "https:// |
- | } | + | "title": "The Discounts for this Item" |
- | }, | + | }, |
- | | + | "fx:coupon_details": |
- | "name": "Flat Rate Product", | + | "href": "https:// |
- | " | + | "title": "The Coupons for this Item" |
- | " | + | } |
- | " | + | }, |
- | "quantity_max": | + | "_embedded": |
- | " | + | "fx:item_options": |
- | " | + | |
- | "parent_code": "" | + | |
- | " | + | |
- | " | + | |
- | "discount_details": | + | |
- | "subscription_frequency": "", | + | |
- | " | + | |
- | "subscription_next_transaction_date": "" | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | "url": "", | + | |
- | " | + | |
- | "length": | + | |
- | | + | |
- | " | + | |
- | " | + | |
- | "date_created": | + | |
- | " | + | |
- | }, | + | |
{ | { | ||
- | | + | |
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
}, | }, | ||
- | | + | "fx:store": { |
- | | + | "href": "https:// |
- | | + | "title": "This Store" |
- | "_links": | + | |
- | }, | + | |
- | "name": | + | |
- | "value": "red", | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | ], | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
}, | }, | ||
- | "item_category_uri": " | + | "fx: |
- | "name": "Test Product", | + | "href": " |
- | | + | "title": "This Cart" |
- | "quantity" | + | |
- | " | + | "fx:item": |
- | "quantity_max": | + | "href": "https:// |
- | " | + | "title": "This Item" |
- | " | + | |
- | "parent_code": "" | + | }, |
- | | + | "name": "Colour", |
- | " | + | "value": "Sparkletoots", |
- | "discount_details": "", | + | "price_mod": 0, |
- | "subscription_frequency": "", | + | "weight_mod": 0, |
- | "subscription_start_date": | + | " |
- | " | + | " |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | "width": 0, | + | |
- | " | + | |
- | " | + | |
- | | + | |
- | " | + | |
} | } | ||
- | | + | |
- | "fx:shipment": { | + | "fx:item_category": { |
- | "address_name": "", | + | "_links": |
- | "first_name": "", | + | |
- | "last_name": "", | + | { |
- | "company": "", | + | " |
- | "address1": "", | + | "href": "https:// |
- | "address2": "", | + | "templated": |
- | "city": "SAINT PAUL", | + | } |
- | "region": "MN", | + | ], |
- | "postal_code": | + | |
- | "country": "US", | + | " |
- | "origin_region": "MN", | + | " |
- | "origin_postal_code": | + | }, |
- | "origin_country": "US", | + | " |
- | "shipping_service_id": | + | " |
- | "shipping_service_description": "", | + | " |
- | "is_residential": | + | }, |
- | "item_count": | + | " |
- | "total_weight": | + | " |
- | "total_customs_value": 0, | + | " |
- | "total_handling_fee": | + | }, |
- | "total_flat_rate_shipping": | + | " |
- | "total_item_price": | + | " |
- | "total_tax": | + | " |
- | "total_shipping": | + | } |
- | "total_price": | + | }, |
+ | "admin_email_template_uri": "", | ||
+ | "customer_email_template_uri": "", | ||
+ | "code": "DEFAULT", | ||
+ | "name": "Default for all products", | ||
+ | "item_delivery_type": "shipped", | ||
+ | "max_downloads_per_customer": | ||
+ | "max_downloads_time_period": | ||
+ | | ||
+ | "default_weight_unit": "LBS", | ||
+ | "default_length_unit": | ||
+ | "shipping_flat_rate_type": "per_order", | ||
+ | "shipping_flat_rate": | ||
+ | "handling_fee_type": "none", | ||
+ | "handling_fee": | ||
+ | "handling_fee_minimum": | ||
+ | "handling_fee_percentage": | ||
+ | "customs_value": 0, | ||
+ | "discount_type": | ||
+ | "discount_name": | ||
+ | "discount_details": | ||
+ | "send_customer_email": | ||
+ | "send_admin_email": | ||
+ | "admin_email": | ||
+ | " | ||
+ | " | ||
+ | } | ||
}, | }, | ||
- | " | + | |
- | { | + | " |
- | "code": "SUMMER", | + | " |
- | "amount": | + | " |
- | "name": "Summer Special", | + | " |
- | "display": | + | " |
- | "is_taxable": "", | + | " |
- | "is_future_discount": "" | + | " |
- | } | + | " |
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | "address_name": "", | ||
+ | "first_name": | ||
+ | " | ||
+ | " | ||
+ | "customer_id": "3456789", | ||
+ | "company": | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | "total_tax": | ||
+ | | ||
+ | "total_price": | ||
+ | }, | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | | ||
], | ], | ||
- | "fx:custom_fields": [ | + | |
- | { | + | " |
- | " | + | " |
- | " | + | }, |
- | "is_hidden": | + | " |
- | } | + | " |
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | | ||
+ | { | ||
+ | | ||
+ | " | ||
+ | | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | | ||
] | ] | ||
- | | + | |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | "customer_ip": "192.168.0.1", | + | " |
- | "ip_country": "United States", | + | " |
- | "session_name": "fcsid", | + | " |
- | "session_id": "hvcv28l8md0qc8qt5rrjh4qo85", | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
+ | | ||
+ | }, | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | " | ||
+ | "use_customer_shipping_address": | ||
+ | | ||
+ | "billing_last_name": | ||
+ | | ||
+ | "billing_address1": | ||
+ | | ||
+ | "billing_city": "SAN DIEGO", | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
} | } | ||
</ | </ | ||
Line 210: | Line 415: | ||
* The items included in the payload will only be those for the shipping address being requested. This means if your store is using multiship and the customer enters a shipping address for a shipto, only the products for that shipto will be included in the payload. | * The items included in the payload will only be those for the shipping address being requested. This means if your store is using multiship and the customer enters a shipping address for a shipto, only the products for that shipto will be included in the payload. | ||
- | * Please review [[https:// | + | |
+ | | ||
* The payload includes several '' | * The payload includes several '' | ||
* USPS uses some custom country names in their API integration which we've worked around using the following modifications. If you're doing a custom integration with them, you may need to do something similar. Please note that the data on this wiki may not be up to date, so contact us if you run into any questions or issues with the below. | * USPS uses some custom country names in their API integration which we've worked around using the following modifications. If you're doing a custom integration with them, you may need to do something similar. Please note that the data on this wiki may not be up to date, so contact us if you run into any questions or issues with the below. |