Bay Photo V2 Order JSON Schema

Type: object
No Additional Properties

Type: string

A unique identifier for the order, which has some meaning to the integrator. This is not the same as the order number assigned by Bay Photo. This will be used to identify a duplicate order in the event that an attempt is made to submit the same order more than once. This should almost certainly always be the integrator's order number, assuming that it is unique across all orders submitted by the integrator.

Must be at least 1 characters long

Must be at most 255 characters long

Order placement time & date

Type: stringFormat: date-time

Time and date at which the order was placed by the customer, in RFC 3339 format (essentially ISO 8601). Must be a time in the past.

Type: string

An arbitrary reference name or identifier, which has some meaning to the integrator.

Must be at least 1 characters long

Must be at most 255 characters long

Bay Photo customer ID

Type: string

Used only by Bay Photo for internal purposes, not by 3rd party integrators. Identifies the actual Bay Photo customer placing the order in contexts where the integration/config itself is not enough to do that.

Must be at least 1 characters long

Notification email

Type: stringFormat: email

A recipient email address to which automated notifications should be sent. Example emails would be order confirmations (if applicable) and shipment confirmations. It will not be used for any other purpose, including general customer service communication. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to allow it.

Shipping information

Type: object

Shipping method code

Type: string

A code that identifies the shipping method to be used for this order. This code is used by Bay Photo to determine the shipping method to use when fulfilling the order.

Must be at least 1 characters long

Must be at most 255 characters long

Account identifier

Type: string

A unique identifier or code corresponding to an existing shipping account to be used when billing. May be required or optional depending on account configuration.

Must be at least 1 characters long

Must be at most 255 characters long

Return address identifier

Type: string

A unique identifier or code corresponding to a return address to be used when shipping this order. May be required or optional depending on account configuration.

Must be at least 1 characters long

Must be at most 255 characters long

Shipping label reference strings

Type: array

Strings which are to be included on printed shipping labels

Must contain a minimum of 0 items

Must contain a maximum of 3 items

No Additional Items

Destination address

Type: object

Name

Type: string

Name of a recipient person or business.

Must be at least 1 characters long

Must be at most 255 characters long

Street address

Type: array of string

Up to four street address lines.

Must contain a minimum of 1 items

Must contain a maximum of 4 items

No Additional Items

Each item of this array must be:

Type: string

Must be at least 1 characters long

Must be at most 255 characters long

City

Type: string

City, village, or locality name.

Must be at least 1 characters long

Must be at most 255 characters long

State or region

Type: string

State or region name, which may be a full name or an abbreviation.

Must be at least 1 characters long

Must be at most 255 characters long

Postal code

Type: string

Must be at least 1 characters long

Must be at most 64 characters long

Country code

Type: enum (of string)

Two-character ISO 3166-1 alpha-2 country code

Must be one of:

  • "AD"
  • "AE"
  • "AF"
  • "AG"
  • "AI"
  • "AL"
  • "AM"
  • "AO"
  • "AQ"
  • "AR"
  • "AS"
  • "AT"
  • "AU"
  • "AW"
  • "AX"
  • "AZ"
  • "BA"
  • "BB"
  • "BD"
  • "BE"
  • "BF"
  • "BG"
  • "BH"
  • "BI"
  • "BJ"
  • "BL"
  • "BM"
  • "BN"
  • "BO"
  • "BQ"
  • "BR"
  • "BS"
  • "BT"
  • "BV"
  • "BW"
  • "BY"
  • "BZ"
  • "CA"
  • "CC"
  • "CD"
  • "CF"
  • "CG"
  • "CH"
  • "CI"
  • "CK"
  • "CL"
  • "CM"
  • "CN"
  • "CO"
  • "CR"
  • "CU"
  • "CV"
  • "CW"
  • "CX"
  • "CY"
  • "CZ"
  • "DE"
  • "DJ"
  • "DK"
  • "DM"
  • "DO"
  • "DZ"
  • "EC"
  • "EE"
  • "EG"
  • "EH"
  • "ER"
  • "ES"
  • "ET"
  • "FI"
  • "FJ"
  • "FK"
  • "FM"
  • "FO"
  • "FR"
  • "GA"
  • "GB"
  • "GD"
  • "GE"
  • "GF"
  • "GG"
  • "GH"
  • "GI"
  • "GL"
  • "GM"
  • "GN"
  • "GP"
  • "GQ"
  • "GR"
  • "GS"
  • "GT"
  • "GU"
  • "GW"
  • "GY"
  • "HK"
  • "HM"
  • "HN"
  • "HR"
  • "HT"
  • "HU"
  • "ID"
  • "IE"
  • "IL"
  • "IM"
  • "IN"
  • "IO"
  • "IQ"
  • "IR"
  • "IS"
  • "IT"
  • "JE"
  • "JM"
  • "JO"
  • "JP"
  • "KE"
  • "KG"
  • "KH"
  • "KI"
  • "KM"
  • "KN"
  • "KP"
  • "KR"
  • "KW"
  • "KY"
  • "KZ"
  • "LA"
  • "LB"
  • "LC"
  • "LI"
  • "LK"
  • "LR"
  • "LS"
  • "LT"
  • "LU"
  • "LV"
  • "LY"
  • "MA"
  • "MC"
  • "MD"
  • "ME"
  • "MF"
  • "MG"
  • "MH"
  • "MK"
  • "ML"
  • "MM"
  • "MN"
  • "MO"
  • "MP"
  • "MQ"
  • "MR"
  • "MS"
  • "MT"
  • "MU"
  • "MV"
  • "MW"
  • "MX"
  • "MY"
  • "MZ"
  • "NA"
  • "NC"
  • "NE"
  • "NF"
  • "NG"
  • "NI"
  • "NL"
  • "NO"
  • "NP"
  • "NR"
  • "NU"
  • "NZ"
  • "OM"
  • "PA"
  • "PE"
  • "PF"
  • "PG"
  • "PH"
  • "PK"
  • "PL"
  • "PM"
  • "PN"
  • "PR"
  • "PS"
  • "PT"
  • "PW"
  • "PY"
  • "QA"
  • "RE"
  • "RO"
  • "RS"
  • "RU"
  • "RW"
  • "SA"
  • "SB"
  • "SC"
  • "SD"
  • "SE"
  • "SG"
  • "SH"
  • "SI"
  • "SJ"
  • "SK"
  • "SL"
  • "SM"
  • "SN"
  • "SO"
  • "SR"
  • "SS"
  • "ST"
  • "SV"
  • "SX"
  • "SY"
  • "SZ"
  • "TC"
  • "TD"
  • "TF"
  • "TG"
  • "TH"
  • "TJ"
  • "TK"
  • "TL"
  • "TM"
  • "TN"
  • "TO"
  • "TR"
  • "TT"
  • "TV"
  • "TW"
  • "TZ"
  • "UA"
  • "UG"
  • "UM"
  • "US"
  • "UY"
  • "UZ"
  • "VA"
  • "VC"
  • "VE"
  • "VG"
  • "VI"
  • "VN"
  • "VU"
  • "WF"
  • "WS"
  • "YE"
  • "YT"
  • "ZA"
  • "ZM"
  • "ZW"

Billing summary

Type: object

A summary of billing information and amounts for the order. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to require it.

Tax amount

Type: integer

Tax total in integer cents.

Value must be greater or equal to 0

Shipping amount

Type: integer

Shipping total in integer cents, including discounts.

Value must be greater or equal to 0

Sub-total amount

Type: integer

Sub-total in integer cents, including discounts.

Value must be greater or equal to 0

Total amount

Type: integer

Complete total in integer cents, including discounts.

Value must be greater or equal to 0

Promo code name

Type: string

The name/code of the promo code applied to the order, if any.

Must be at least 1 characters long

Gift certificate

Type: object

Information about a gift certificate used on this order.

Gift certificate name

Type: string

The name or code of the gift certificate used.

Must be at least 1 characters long

Gift certificate amount used

Type: integer

The amount of the gift certificate used, in integer cents.

Value must be greater or equal to 0

Payment method


Details about the payment method to be used to bill this order. Only applicable to integrations/orders which are not pre-paid. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to require it.

Type: object

If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

Type: object

Type: const
Specific value: true
Type: object

Type: const
Specific value: false
Type: object

If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

Type: object

Type: const
Specific value: true
Type: object

Type: const
Specific value: false

Payment method display name

Type: string

A helpful display name for the payment method.


Examples:

"Apple Pay"
"PayPal"
"Braintree"

Net terms

Type: boolean Default: false

True if the order is to be billed on net terms.

Bill method on file

Type: boolean Default: false

True if the order is to be billed using the default payment method on file for the customer.

Images

Type: object

A complete list of all images to be used in the order. Property names are arbitrary unique identifiers for each image, and that property name should be used to identify the image in the order wherever it is intended to be used. Property names are limited to 255 characters.

No Additional Properties

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^.{1,255}$
Type: object

Type: string

The filename of the image, which may be used to identify images within an order. Not a path - do not include slashes or other path separators.

Must be at least 1 characters long

Must be at most 255 characters long

Type: string

The full URL of the image, exactly as it should be used when the image is being retrieved during order processing. The image's accessibility may be evaluated upon order submission, and as a result it is strongly recommended to ensure the provided URL accepts HEAD requests (which will save bandwidth), and that the URL is usable/accessible before submitting the order.

Must be at least 1 characters long

Must be at most 8192 characters long

Type: string

A URL to a thumbnail-sized copy of the image. Preferably, thumbnails should be kept to a maximum of 400 pixels on the longest side. This thumbnail is optional. A thumbnail will be generated internally if not provided, so providing a thumbnail will decrease the wait time for order acceptance. As with full-size image URLs, is strongly recommended to ensure the provided URL usable/accessible before submitting the order.

Must be at least 1 characters long

Must be at most 8192 characters long

Color correction

Type: boolean Default: false

A flag indicating whether or not color correction should be applied to the image.

Products

Type: array of object

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: object

Product name

Type: object

An optional product name, which may be used to visually identify the product within the order JSON. Including a value here will be helpful to both the integrator and Bay Photo when it comes to identifying products quickly.

Product code

Type: string

The code that identifies the product being ordered.

Must be at least 1 characters long

Must be at most 255 characters long

Type: string

An unique identifier for the exact instance of this product, as it exists in this order, which has some meaning to the integrator. This is NOT the same as a product code or SKU - the same product ordered multiple times in the same order, or across multiple orders, should have different internal identifiers. Intended to help an integrator link their internal order data with order data after submission.

Must be at least 1 characters long

Must be at most 255 characters long

Quantity

Type: integer

Value must be greater or equal to 1

Product size

Type: object

Some integrators may have a catalog setup which contains 'custom size' products, which do not have a fixed size, and must have their size specified in the order. Including a custom sized product in an order without a size will cause the order to be rejected.

Width

Type: number

Product width in inches

Value must be greater or equal to 0 and a multiple of 0.25

Height

Type: number

Product height in inches

Value must be greater or equal to 0 and a multiple of 0.25

Product billing summary

Type: object

A summary of billing information and amounts for A SINGLE QUANTITY of this product. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to require it.

Price

Type: integer

Single-quantity price, without discounts, in integer cents.

Value must be greater or equal to 0

Discount

Type: integer

Single-quantity discount amount, in integer cents.

Value must be greater or equal to 0

Sub total

Type: integer

Single-quantity price, including discounts, in integer cents.

Value must be greater or equal to 0

Discount code

Type: string

The literal discount code or promo code applied.


Examples:

"METALLUV"
"SUPER20"

Discount label

Type: string

Displayable 'name' of the discount, usually helpful because the code itself is not helpful in understanding what the true meaning of the discount is.


Examples:

"10%"
"7.5%"

Product options

Type: array of object

A list of product-level options associated with the product. Depending on the product, one or more options may be required to be specified.

No Additional Items

Each item of this array must be:

Type: object

Option name

Type: object

An optional option name, which may be used to visually identify the option within the order JSON. Including a value here will be helpful to both the integrator and Bay Photo when it comes to identifying options quickly.

Option code

Type: string

The code that identifies the option being ordered.

Must be at least 1 characters long

Must be at most 255 characters long

Quantity

Type: integer

Value must be greater or equal to 1

Option size

Type: object

Some integrators may have a catalog setup which contains 'custom size' options, which do not have a fixed size, and must have their size specified in the order, either for pricing or production reasons. Including a custom sized option in an order without a size will cause the order to be rejected.

Width

Type: number

Option width in inches

Value must be greater or equal to 0 and a multiple of 0.25

Height

Type: number

Option height in inches

Value must be greater or equal to 0 and a multiple of 0.25

Text content

Type: string

Options may occasionally require some text content to be specified, i.e. imprinting text.

Must be at most 256 characters long

Product option billing summary

Type: object

A summary of billing information and amounts for A SINGLE QUANTITY of this option. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to require it.

Price

Type: integer

Single-quantity price, without discounts, in integer cents.

Value must be greater or equal to 0

Discount

Type: integer

Single-quantity discount amount, in integer cents.

Value must be greater or equal to 0

Sub total

Type: integer

Single-quantity price, including discounts, in integer cents.

Value must be greater or equal to 0

Discount code

Type: string

The literal discount code or promo code applied.


Examples:

"METALLUV"
"SUPER20"

Discount label

Type: string

Displayable 'name' of the discount, usually helpful because the code itself is not helpful in understanding what the true meaning of the discount is.


Examples:

"10%"
"7.5%"

Pricing configuration

Type: object

A configuration object that contains pricing adjustment data to be used when processing the order. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to allow it.

Invoice price

Type: integer

A single unit price value for a product/option to use when invoicing this order, in integer cents. Not usable by default, standard integrations will not use this value.

Value must be greater or equal to 0

Price adjustment keyword

Type: string

Price adjustment method to send to Labworks (FKA service_type). Not usable by default, standard integrations will not use this value.


Examples:

"L"
"G"
"M"
"RUSH50"
"METALLIC"

Images

Type: object

A map between image node IDs and information about what image to apply, and how to apply it.

No Additional Properties

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression: ^[0-9]+$

Product image

Type: object
No Additional Properties

Image unique identifier

Type: object

The unique identifier for the image to be associated with the specified image node. This identifier is determined by the integrator and can be found in the top-level images section of the order JSON document. An image can (and should) be reused across multiple products in the same order, if necessary.

Job text

Type: string

"Job text" to be passed directly into DP2 when rendering this image in the product layout for print. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to allow it.

Must be at least 1 characters long

Display rotation

Type: number Default: 0

Number of degrees to rotate the entire product for
right-reading display or rendering, clockwise. Only to
be provided if specifically requested by Bay Photo.
Including this JSON property will cause orders to be
rejected if the integration is not configured to allow
it. Typically used to correct for the purely-visual
rotation of certain products in a user-displayed view,
when the natural orientation of a product is different
from the way it is shown to the user. This can impact
crop values.

Value must be greater or equal to 0

Image filter

Type: enum (of string)

An optional image filter/LUT to apply to the image for this product. Only to be provided if specifically allowed by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to allow it.

Must be one of:

  • "bw"
  • "sepia1"
  • "sepia2"

Image crop data

Type: object

Crop information as it relates to the specified image being placed in the specified image node. Cropping is not available to integrators by default. Including this JSON property will cause orders to be rejected if the integration is not configured to allow it. We strongly recommend against using cropping due to its inherent complexity. Provide images which have already been correctly sized for the product being ordered.

If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

Type: object

Type: const
Specific value: "C"
Type: object

Crop x

Type: number

The distance from the left edge of the node to the center of the uncropped image, wherein the magnitude of the number indicates a percentage of the width of the uncropped image, and the sign of the number indicates on which side of the left edge of the node the center of the uncropped image lies. Positive numbers indicate that the center of the image lies to the right of the left edge of the node. Negative numbers indicate that the center of the image lies to the left of the left edge of the node.

Value must be strictly greater than 0 and strictly lesser than 100

Crop y

Type: number

The distance from the top edge of the node to the center of the uncropped image, wherein the magnitude of the number indicates a percentage of the height of the uncropped image, and the sign of the number indicates on which side of the top edge of the node the center of the uncropped image lies. Positive numbers indicate that the center of the image lies below the top edge of the node. Negative numbers indicate that the center of the image lies above the top edge of the node.

Value must be strictly greater than 0 and strictly lesser than 100

Crop width

Type: number

Width of the crop area, given as a percentage of the full image's width

Value must be strictly greater than 0 and lesser or equal to 100

Crop height

Type: number

Height of the crop area, given as a percentage of the full image's height

Value must be strictly greater than 0 and lesser or equal to 100

Rotation

Type: number

Rotation of the node image in degrees, clockwise

Value must be greater or equal to 0

Crop type

Type: enum (of string)

The crop type/method to be used.

Must be one of:

  • "C"
  • "F"

Pricing configuration

Type: object

A configuration object that contains pricing adjustment data to be used when processing the order. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to allow it.

Same definition as pricing_configuration

Order options

Type: array of object

A list of order-level options, not associated with any particular product.

No Additional Items

Each item of this array must be:

Type: object

Option name

Type: object

An optional option name, which may be used to visually identify the option within the order JSON. Including a value here will be helpful to both the integrator and Bay Photo when it comes to identifying options quickly.

Option code

Type: string

The code that identifies the option being ordered.

Must be at least 1 characters long

Must be at most 255 characters long

Quantity

Type: integer

Value must be greater or equal to 1

Text content

Type: string

Options may occasionally require some text content to be specified, i.e. imprinting text.

Must be at most 256 characters long

Order option billing summary

Type: object

A summary of billing information and amounts for A SINGLE QUANTITY of this order option. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to require it.

Price

Type: integer

Single-quantity price, without discounts, in integer cents.

Value must be greater or equal to 0

Discount

Type: integer

Single-quantity discount amount, in integer cents.

Value must be greater or equal to 0

Sub total

Type: integer

Single-quantity price, including discounts, in integer cents.

Value must be greater or equal to 0

Discount code

Type: string

The literal discount code or promo code applied.


Examples:

"METALLUV"
"SUPER20"

Discount label

Type: string

Displayable 'name' of the discount, usually helpful because the code itself is not helpful in understanding what the true meaning of the discount is.


Examples:

"10%"
"7.5%"

Pricing configuration

Type: object

A configuration object that contains pricing adjustment data to be used when processing the order. Only to be provided if specifically requested by Bay Photo. Including this JSON property will cause orders to be rejected if the integration is not configured to allow it.

Same definition as pricing_configuration