Placing orders
Order
Field |
Description |
order_name |
Your internal name for this order. This must be unique. |
order_date |
Date you received this order in UTC format |
shipping_billing_code |
Billing code for shipping method; provided by Bay Photo Lab or retrieved from the API by using the endpoint: /api/v1/shipping_methods.json |
return_shipping_id |
Id for customizing shipping labels and more (optional); provided by Bay Photo Lab |
drop_ship |
Set this to true to remove Bay Photo Lab branding from order |
pick_up |
Set this to true if order is being picked up locally at Bay Photo location |
customer |
Your customer's information; used to ship the order to your customer |
products[]
Field |
Description |
product_id |
Unique identifier for the product being ordered |
qty |
Number of products you would like produced |
photos[]
Field |
Description |
image_file_name |
Original file name; often used in communicating about a customer's image |
image_source_path |
URL where Bay Photo Lab can pick up the image for order processing |
crop_width / crop_height |
width,height=100 (full image; ie. 100 percentage of image) |
crop_x / crop_y |
Crop: x;y=50 (center) |
node_uid |
uid of the node the photo will be applied to. In most single node products, this is "1" |
order_services[]
Field |
Description |
service_id |
List of unique identifiers for services to be applied to the entire order |
JSON
POST /api/v1/orders.json
{
"order_name": "your order name. This must be unique.",
"order_date": "2015-03-10 03:03:46 UTC",
"shipping_billing_code": "FEDEX2",
"return_shipping_id": "",
"drop_ship": true,
"customer": {
"name": "John Doe",
"email": "john_doe@gmail.com",
"phone": "123.123.1234",
"address1": "123 first street",
"address2": "apt 0",
"city": "Santa Cruz",
"state": "CA",
"country": "US",
"zip": "95426"
},
"products": [
{
"product_id": 686,
"qty": 2,
"photos": [
{
"image_file_name": "original_filename.jpg",
"image_source_path": "https://www.host.com/1WaPD3YHTwaLJ3y1RhZC",
"crop_height": "100.0",
"crop_width": "100.0",
"crop_x": "50.0",
"crop_y": "50.0",
"node_uid": "1"
}
],
"print_services": [
{
"service_id": 3010
},
{
"service_id": 4616
}
]
}
],
"order_services": [
{
"service_id": 100501
}
]
}