Lectronz API Reference, Version 1

Orders

JSON order representation

The order object represents an order from a customer. An order has one of the following 3 statuses:

  • payment_success means the order has been paid by the customer but not fulfilled yet.
  • fulfilled means that the order has been shipped by the seller.
  • refunded means that the order has been fully refunded by the seller (or Lectronz).

This object has the following properties:

idinteger

Unique identifier of the order.

statusstring

Status of the order.

Valid values are: payment_success, fulfilled, refunded.

store_idinteger

Unique store identifier for the products described in the order.

store_urlstring

Store URL on Lectronz.

customer_emailstring

Customer contact email address for delivery.

customer_phonestring

Customer contact phone for delivery.

shipping_addressobject

Shipping address for fulfillment.

See details
first_namestring

First name

last_namestring

Last name, family name

organizationstring

Name of organization

streetstring

Street address, including the name of the street and number"

street_extensionstring

Additional street location information (e.g. building name and number)

citystring

City

postal_codestring

Postal code, ZIP code

statestring

State, province or region

countrystring

Country

country_codestring

Alpha-2 country code (ISO 3166)

billing_addressobject

Billing address for invoicing purposes.

See details
first_namestring

First name

last_namestring

Last name, family name

organizationstring

Name of organization

streetstring

Street address, including the name of the street and number"

street_extensionstring

Additional street location information (e.g. building name and number)

citystring

City

postal_codestring

Postal code, ZIP code

statestring

State, province or region

countrystring

Country

country_codestring

Alpha-2 country code (ISO 3166)

billing_address_same_as_shipping_addressboolean

True if the customer has explicitly stated that the billing address is the same as the shipping address.

customer_tax_idstring

Tax identifier provided by customer during checkout (e.g. EU VAT number).

customer_legal_statusstring

The self-declared legal status of the customer during checkout. In practice, it will either be "business" or "unspecified". The value "individual" is currently unused.

Valid values are: unspecified, individual, business.

shipping_methodstring

Name of the shipping option selected by the customer during checkout.

shipping_is_trackedboolean

True if the shipping option has tracking information.

shipping_weightobject

No description provided

See details
basenumber

Estimated weight of packaging, excluding ordered items.

totalnumber

Estimated total weight of the order, including packaging.

weight_unitstring

Weight unit.

Valid values are: kg, gr, lb, oz.

ioss_numberstring, optional

This contains the IOSS number used by Lectronz for imports into the EU, for sellers outside of the EU. This will only be present if an IOSS number is required for the order, and if the order in not fulfilled or refunded.

itemsarray of object

List of items ordered.

See details
product_idinteger

Unique product identifier.

product_namestring

Product name

product_descriptionstring

Short product description, as shown on the corresponding web page.

skustring, optional

Optional unique identifier used by the seller to track inventory. Only provided if present.

pricenumber

Price of one unit of the product, excluding taxes.

discountnumber, optional

Discount amount applied to one unit of product. It will only be present if a discount was applied.

quantityinteger

Quantity of the product ordered.

weightnumber

Estimated weight of the product.

optionsarray of object

Product options

See details
namestring

Name of the option

choicestring

Choice selected for the specified option.

skustring, optional

Optional unique identifier used by the seller to track inventory. Only provided if present.

weightnumber

Weight added by this option.

currencystring

3-letter currency code of the order. Applies to all amounts in the order.

Valid values are: EUR.

shipping_costnumber

Shipping cost

tax_applies_to_shippingboolean

If false, the shipping_cost amount is excluded from tax calculation.

subtotalnumber

Total amount of the order, excluding taxes.

taxable_amountnumber

The total amount to which taxes apply.

total_taxnumber

The total amount of taxes.

tax_ratenumber

Applicable tax rate (percentage).

totalnumber

Total amount paid for the order.

fulfilled_atstring, optional

Date of fulfillment in ISO 8601 format (UTC). Only provided if the order has been fulfilled.

tracking_codestring

Tracking code used for shipping the order.

tracking_urlstring

Tracking URL used for shipping the order.

lectronz_feenumber

Amount collected by Lectronz as a service fee.

tax_collectednumber

Amount of tax collected by Lectronz on behalf of the seller where applicable.

discount_codesstring, optional

Discount code applied to this order, if any.

payment_feesnumber, optional

Fees collected by the payment provider on the payment for this order. May be absent if the payment provider has not provided this information yet.

payoutnumber, optional

Amount paid out to the seller for this order. May be absent if the payout has not been calculated yet.

paymentobject

No description provided

See details
providerstring

The name of the payment provider.

Valid values are: stripe.

referencestring

Reference of the payment with the selected provider.

created_atstring

UTC creation date of order in ISO 8601 format.

updated_atstring

Last update of order in ISO 8601 format (UTC).

fulfill_untilstring

Deadline for shipping the order.

customer_notestring, optional

Note left by customer with the order, if any.

Get an order

Request

GET/api/v1/orders/{id}

Response body (object)

JSON order representation

details
idinteger

Unique identifier of the order.

statusstring

Status of the order.

Valid values are: payment_success, fulfilled, refunded.

store_idinteger

Unique store identifier for the products described in the order.

store_urlstring

Store URL on Lectronz.

customer_emailstring

Customer contact email address for delivery.

customer_phonestring

Customer contact phone for delivery.

shipping_addressobject

Shipping address for fulfillment.

See details
first_namestring

First name

last_namestring

Last name, family name

organizationstring

Name of organization

streetstring

Street address, including the name of the street and number"

street_extensionstring

Additional street location information (e.g. building name and number)

citystring

City

postal_codestring

Postal code, ZIP code

statestring

State, province or region

countrystring

Country

country_codestring

Alpha-2 country code (ISO 3166)

billing_addressobject

Billing address for invoicing purposes.

See details
first_namestring

First name

last_namestring

Last name, family name

organizationstring

Name of organization

streetstring

Street address, including the name of the street and number"

street_extensionstring

Additional street location information (e.g. building name and number)

citystring

City

postal_codestring

Postal code, ZIP code

statestring

State, province or region

countrystring

Country

country_codestring

Alpha-2 country code (ISO 3166)

billing_address_same_as_shipping_addressboolean

True if the customer has explicitly stated that the billing address is the same as the shipping address.

customer_tax_idstring

Tax identifier provided by customer during checkout (e.g. EU VAT number).

customer_legal_statusstring

The self-declared legal status of the customer during checkout. In practice, it will either be "business" or "unspecified". The value "individual" is currently unused.

Valid values are: unspecified, individual, business.

shipping_methodstring

Name of the shipping option selected by the customer during checkout.

shipping_is_trackedboolean

True if the shipping option has tracking information.

shipping_weightobject

No description provided

See details
basenumber

Estimated weight of packaging, excluding ordered items.

totalnumber

Estimated total weight of the order, including packaging.

weight_unitstring

Weight unit.

Valid values are: kg, gr, lb, oz.

ioss_numberstring, optional

This contains the IOSS number used by Lectronz for imports into the EU, for sellers outside of the EU. This will only be present if an IOSS number is required for the order, and if the order in not fulfilled or refunded.

itemsarray of object

List of items ordered.

See details
product_idinteger

Unique product identifier.

product_namestring

Product name

product_descriptionstring

Short product description, as shown on the corresponding web page.

skustring, optional

Optional unique identifier used by the seller to track inventory. Only provided if present.

pricenumber

Price of one unit of the product, excluding taxes.

discountnumber, optional

Discount amount applied to one unit of product. It will only be present if a discount was applied.

quantityinteger

Quantity of the product ordered.

weightnumber

Estimated weight of the product.

optionsarray of object

Product options

See details
namestring

Name of the option

choicestring

Choice selected for the specified option.

skustring, optional

Optional unique identifier used by the seller to track inventory. Only provided if present.

weightnumber

Weight added by this option.

currencystring

3-letter currency code of the order. Applies to all amounts in the order.

Valid values are: EUR.

shipping_costnumber

Shipping cost

tax_applies_to_shippingboolean

If false, the shipping_cost amount is excluded from tax calculation.

subtotalnumber

Total amount of the order, excluding taxes.

taxable_amountnumber

The total amount to which taxes apply.

total_taxnumber

The total amount of taxes.

tax_ratenumber

Applicable tax rate (percentage).

totalnumber

Total amount paid for the order.

fulfilled_atstring, optional

Date of fulfillment in ISO 8601 format (UTC). Only provided if the order has been fulfilled.

tracking_codestring

Tracking code used for shipping the order.

tracking_urlstring

Tracking URL used for shipping the order.

lectronz_feenumber

Amount collected by Lectronz as a service fee.

tax_collectednumber

Amount of tax collected by Lectronz on behalf of the seller where applicable.

discount_codesstring, optional

Discount code applied to this order, if any.

payment_feesnumber, optional

Fees collected by the payment provider on the payment for this order. May be absent if the payment provider has not provided this information yet.

payoutnumber, optional

Amount paid out to the seller for this order. May be absent if the payout has not been calculated yet.

paymentobject

No description provided

See details
providerstring

The name of the payment provider.

Valid values are: stripe.

referencestring

Reference of the payment with the selected provider.

created_atstring

UTC creation date of order in ISO 8601 format.

updated_atstring

Last update of order in ISO 8601 format (UTC).

fulfill_untilstring

Deadline for shipping the order.

customer_notestring, optional

Note left by customer with the order, if any.

Update an order

Update an order to mark it as fulfilled and optionally provide tracking information. The fields tracking_code and tracking_url are required if the shipping method associated with the order is tracked, as indicated by the shipping_is_tracked property of the order.

Request

PATCH/api/v1/orders/{id}

Request body (object)

JSON fulfillment information object

details
statusstring

Updated status of order.

Valid values are: fulfilled.

tracking_codestring

Tracking code of shipment.

tracking_urlstring

Tracking URL of shipment.

Get a list of orders

Get a list of orders from oldest to newest. You can use the limit and offset query parameters to paginate the results. Tip: Use the total_count property of the response to know how many orders are available, which can be obtained without fetching the entire list by using the limit=0 query parameter.

Request

GET/api/v1/orders

Query string parameters

limitinteger

Optional. The maximum number of orders provided in the response (default is 20).

offsetinteger

Optional. The number of orders to skip in the response (default is 0). By combining offset and limit, it is possible to display only a specific portion of all orders.

Response body (object)

JSON object representing a list of orders

details
limitinteger

The maximum number of orders in the list.

offsetinteger

The index of the first order in the list, where index 0 represents the oldest order in the list, and where total_count-1 represents the newest order.

total_countinteger

The total number of existing orders.

ordersarray of object

No description provided

See details
idinteger

Unique identifier of the order.

statusstring

Status of the order.

Valid values are: payment_success, fulfilled, refunded.

store_idinteger

Unique store identifier for the products described in the order.

store_urlstring

Store URL on Lectronz.

customer_emailstring

Customer contact email address for delivery.

customer_phonestring

Customer contact phone for delivery.

shipping_addressobject

Shipping address for fulfillment.

See details
first_namestring

First name

last_namestring

Last name, family name

organizationstring

Name of organization

streetstring

Street address, including the name of the street and number"

street_extensionstring

Additional street location information (e.g. building name and number)

citystring

City

postal_codestring

Postal code, ZIP code

statestring

State, province or region

countrystring

Country

country_codestring

Alpha-2 country code (ISO 3166)

billing_addressobject

Billing address for invoicing purposes.

See details
first_namestring

First name

last_namestring

Last name, family name

organizationstring

Name of organization

streetstring

Street address, including the name of the street and number"

street_extensionstring

Additional street location information (e.g. building name and number)

citystring

City

postal_codestring

Postal code, ZIP code

statestring

State, province or region

countrystring

Country

country_codestring

Alpha-2 country code (ISO 3166)

billing_address_same_as_shipping_addressboolean

True if the customer has explicitly stated that the billing address is the same as the shipping address.

customer_tax_idstring

Tax identifier provided by customer during checkout (e.g. EU VAT number).

customer_legal_statusstring

The self-declared legal status of the customer during checkout. In practice, it will either be "business" or "unspecified". The value "individual" is currently unused.

Valid values are: unspecified, individual, business.

shipping_methodstring

Name of the shipping option selected by the customer during checkout.

shipping_is_trackedboolean

True if the shipping option has tracking information.

shipping_weightobject

No description provided

See details
basenumber

Estimated weight of packaging, excluding ordered items.

totalnumber

Estimated total weight of the order, including packaging.

weight_unitstring

Weight unit.

Valid values are: kg, gr, lb, oz.

ioss_numberstring, optional

This contains the IOSS number used by Lectronz for imports into the EU, for sellers outside of the EU. This will only be present if an IOSS number is required for the order, and if the order in not fulfilled or refunded.

itemsarray of object

List of items ordered.

See details
product_idinteger

Unique product identifier.

product_namestring

Product name

product_descriptionstring

Short product description, as shown on the corresponding web page.

skustring, optional

Optional unique identifier used by the seller to track inventory. Only provided if present.

pricenumber

Price of one unit of the product, excluding taxes.

discountnumber, optional

Discount amount applied to one unit of product. It will only be present if a discount was applied.

quantityinteger

Quantity of the product ordered.

weightnumber

Estimated weight of the product.

optionsarray of object

Product options

See details
namestring

Name of the option

choicestring

Choice selected for the specified option.

skustring, optional

Optional unique identifier used by the seller to track inventory. Only provided if present.

weightnumber

Weight added by this option.

currencystring

3-letter currency code of the order. Applies to all amounts in the order.

Valid values are: EUR.

shipping_costnumber

Shipping cost

tax_applies_to_shippingboolean

If false, the shipping_cost amount is excluded from tax calculation.

subtotalnumber

Total amount of the order, excluding taxes.

taxable_amountnumber

The total amount to which taxes apply.

total_taxnumber

The total amount of taxes.

tax_ratenumber

Applicable tax rate (percentage).

totalnumber

Total amount paid for the order.

fulfilled_atstring, optional

Date of fulfillment in ISO 8601 format (UTC). Only provided if the order has been fulfilled.

tracking_codestring

Tracking code used for shipping the order.

tracking_urlstring

Tracking URL used for shipping the order.

lectronz_feenumber

Amount collected by Lectronz as a service fee.

tax_collectednumber

Amount of tax collected by Lectronz on behalf of the seller where applicable.

discount_codesstring, optional

Discount code applied to this order, if any.

payment_feesnumber, optional

Fees collected by the payment provider on the payment for this order. May be absent if the payment provider has not provided this information yet.

payoutnumber, optional

Amount paid out to the seller for this order. May be absent if the payout has not been calculated yet.

paymentobject

No description provided

See details
providerstring

The name of the payment provider.

Valid values are: stripe.

referencestring

Reference of the payment with the selected provider.

created_atstring

UTC creation date of order in ISO 8601 format.

updated_atstring

Last update of order in ISO 8601 format (UTC).

fulfill_untilstring

Deadline for shipping the order.

customer_notestring, optional

Note left by customer with the order, if any.