UltracartClient::FulfillmentApi
All URIs are relative to https://secure.ultracart.com/rest/v2
Method | HTTP request | Description |
---|---|---|
acknowledge_orders | PUT /fulfillment/distribution_centers/distribution_center_code/acknowledgements | Acknowledge receipt of orders. |
generate_packing_slip | GET /fulfillment/distribution_centers/distribution_center_code/orders/order_id | Generate a packing slip for this order for the given distribution center. |
get_distribution_center_orders | GET /fulfillment/distribution_centers/distribution_center_code/orders | Retrieve orders queued up for this distribution center. |
get_distribution_centers | GET /fulfillment/distribution_centers | Retrieve distribution centers |
ship_orders | POST /fulfillment/distribution_centers/distribution_center_code/shipments | Mark orders as shipped |
update_inventory | POST /fulfillment/distribution_centers/distribution_center_code/inventory | Update inventory |
acknowledge_orders
acknowledge_orders(distribution_center_code, order_ids)
Acknowledge receipt of orders.
Acknowledge receipt of orders so that they are removed from the fulfillment queue. This method must be called after receiving and order (via webhook) or retrieving (via retrieve orders method).
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::FulfillmentApi.new_using_api_key(simple_key, false, false)
distribution_center_code = 'distribution_center_code_example' # String | Distribution center code
order_ids = [UltracartClient::Array<String>.new] # Array<String> | Orders to acknowledge receipt of (limit 100)
begin
#Acknowledge receipt of orders.
api_instance.acknowledge_orders(distribution_center_code, order_ids)
rescue UltracartClient::ApiError => e
puts "Exception when calling FulfillmentApi->acknowledge_orders: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
distribution_center_code | String | Distribution center code | |
order_ids | Array<String> | Orders to acknowledge receipt of (limit 100) |
Return type
nil (empty response body)
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
generate_packing_slip
OrdersResponse generate_packing_slip(distribution_center_code, order_id)
Generate a packing slip for this order for the given distribution center.
The packing slip PDF that is returned is base 64 encoded
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::FulfillmentApi.new_using_api_key(simple_key, false, false)
distribution_center_code = 'distribution_center_code_example' # String | Distribution center code
order_id = 'order_id_example' # String | Order ID
begin
#Generate a packing slip for this order for the given distribution center.
result = api_instance.generate_packing_slip(distribution_center_code, order_id)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling FulfillmentApi->generate_packing_slip: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
distribution_center_code | String | Distribution center code | |
order_id | String | Order ID |
Return type
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
get_distribution_center_orders
OrdersResponse get_distribution_center_orders(distribution_center_code)
Retrieve orders queued up for this distribution center.
Retrieves up to 100 orders that are queued up in this distribution center. You must acknowledge them before additional new orders will be returned. There is NO record chunking. You'll get the same 100 records again and again until you acknowledge orders. The orders that are returned contain only items for this distribution center and are by default completely expanded with billing, buysafe, channel_partner, checkout, coupons, customer_profile, edi, gift, gift_certificate, internal, items, payment, shipping, summary, taxes.
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::FulfillmentApi.new_using_api_key(simple_key, false, false)
distribution_center_code = 'distribution_center_code_example' # String | Distribution center code
begin
#Retrieve orders queued up for this distribution center.
result = api_instance.get_distribution_center_orders(distribution_center_code)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling FulfillmentApi->get_distribution_center_orders: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
distribution_center_code | String | Distribution center code |
Return type
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
get_distribution_centers
DistributionCentersResponse get_distribution_centers
Retrieve distribution centers
Retrieves the distribution centers that this user has access to.
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::FulfillmentApi.new_using_api_key(simple_key, false, false)
begin
#Retrieve distribution centers
result = api_instance.get_distribution_centers
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling FulfillmentApi->get_distribution_centers: #{e}"
end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
ship_orders
ship_orders(distribution_center_code, shipments)
Mark orders as shipped
Store the tracking information and mark the order shipped for this distribution center.
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::FulfillmentApi.new_using_api_key(simple_key, false, false)
distribution_center_code = 'distribution_center_code_example' # String | Distribution center code
shipments = [UltracartClient::FulfillmentShipment.new] # Array<FulfillmentShipment> | Orders to mark shipped
begin
#Mark orders as shipped
api_instance.ship_orders(distribution_center_code, shipments)
rescue UltracartClient::ApiError => e
puts "Exception when calling FulfillmentApi->ship_orders: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
distribution_center_code | String | Distribution center code | |
shipments | Array<FulfillmentShipment> | Orders to mark shipped |
Return type
nil (empty response body)
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json
update_inventory
update_inventory(distribution_center_code, inventories)
Update inventory
Update the inventory for items associated with this distribution center
Example
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::FulfillmentApi.new_using_api_key(simple_key, false, false)
distribution_center_code = 'distribution_center_code_example' # String | Distribution center code
inventories = [UltracartClient::FulfillmentInventory.new] # Array<FulfillmentInventory> | Inventory updates (limit 500)
begin
#Update inventory
api_instance.update_inventory(distribution_center_code, inventories)
rescue UltracartClient::ApiError => e
puts "Exception when calling FulfillmentApi->update_inventory: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
distribution_center_code | String | Distribution center code | |
inventories | Array<FulfillmentInventory> | Inventory updates (limit 500) |
Return type
nil (empty response body)
Authorization
ultraCartOauth, ultraCartSimpleApiKey
HTTP request headers
- Content-Type: application/json
- Accept: application/json