Fulfillments

POST https://api.ecartapi.com/api/v2/orders/{{orderId}}/fulfillments

This request creates a fulfillment on an Order

Features.

The items array is optional it can be send on selected ecommerces to create partial fulfillments, if you want to make a complete fulfillment just skip sending this information and the fulfillment information will be applied to all the items in the order.

This API request has a feature that some ecommerces support, which allows to send the items of the order you choose to be fulfilled allowing for partial fulfillments. (THIS IS ONLY ON SELECTED ECOMMERCES REVIEW THE SUPPORTED REQUESTS BY CART FOLDER TO SEE IF THE ECOMMERCE YOU ARE USING ALLOWS THIS FEATURE)

NOTE:

We recommend that if you are going to be making this request to all of the ecommerces we offer to follow this payload as it has all the required information of the overall ecommerce's.

If you are only going to be working with a selected few ecommerce we recommend to go to our Supported Requests By Cart folder and using the payload from the ecommerce you choose to work with.

Important information:

  • The order's ID must exist

Request Body

{"fulfillment"=>{"tracking"=>{"number"=>"987654321", "company"=>"Envia", "url"=>"https://shipping.xyz/track.php?num=123456789"}, "items"=>[{"id"=>"3796176371756", "quantity"=>"14"}], "fulfillmentOrderId"=>"This ID is Found only in SHOPIFY in the single order request under the locations array", "phone"=>"8662137199", "shippingDate"=>"2021-12-08", "package"=>{"dimensions"=>{"length"=>"5", "width"=>"5", "height"=>"5", "weight"=>"1000"}, "units"=>{"length"=>"cm", "width"=>"cm", "height"=>"cm", "weight"=>"kg"}}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Authorizationstring

RESPONSES

status: OK

{"success":true,"fulfillment":{"id":"4090359972017","shippingMethod":{"id":null,"service":"manual"},"tracking":{"number":"987654321","url":"https://shipping.xyz/track.php?num=123456789","company":"Envia"},"status":{"id":null,"status":"success","shipment":null},"location":{"id":"53355577521","name":"Vasconcelos 1400","country":{"code":"MX","name":"Mexico"},"state":{"code":"NL","name":"Nuevo León"},"postalCode":"66236"},"items":[{"id":"11700012875953","variantId":"41293246628017","productId":"7096605671601","quantity":"1","ecartapiUrl":"https://api.ecartapi.com/api/v2/products/7096605671601"}],"packages":[],"dates":{"createdAt":"2022-08-11T13:36:41-04:00","updatedAt":"2022-08-11T13:36:41-04:00","shippedAt":null}}}