REST API
The app provides a secure REST API to the internal items' data via Shopify's app proxy /apps/serializer/items endpoint using HTTP GET method. The API may be particularly useful for item verification, e.g. the customer could enter the received item's serial number and ensure it is an original product from the merchant's store.
The endpoint accepts the following API query filters:
orderId
Integer
Shopify's numeric order ID.
customerId
Integer
Shopify's numeric customer ID.
productVariantId
Integer
Shopify's numeric product variant ID.
lineItemId
Integer
Shopify's numeric line item ID.
serialNumber
String
Manually entered serial number.
itemId
String
Globally unique item ID generated by the app.
itemRef
String
It filters results by serialNumber or itemId. The filter may be helpful when the store uses both serialNumber and itemId fields as serial numbers.
cursor
String
Results are limited to 100 items per request. The filter provides a capability to paginate through the results.
The API endpoint requires at least one of the following filters to be used: orderId, customerId, serialNumber, itemId or itemRef. For example, GET /apps/serializer/items?orderId=4460047270069
.
The endpoint response contains the following JSON data:
previous
String
Cursor to the previous page.
hasPrevious
Boolean
It highlights whether the previous page exists.
next
String
Cursor to the next page.
hasNext
String
It highlights whether the next page exists.
results
Array of items
See the table below for the information about item fields.
Item fields:
lineItemId
Integer
Shopify's numeric line item ID.
productVariantId
Integer
Shopify's numeric customer ID.
itemId
String
Globally unique item ID generated by the app. It can be used as a serial number.
serialNumber
String or undefined (not populated)
Manually entered serial number. The app only enforces uniqueness per line item. Theoretically, different manufacturers could use the same serial number for different products.
warrantyDuration
Undefined (not populated), null or JSON object containing the following fields:
unit - string. Possible values are "day", "month" or "year".
value - integer, the minimum value is 1.
It contains a warranty duration for the item.
customFields
Undefined (not populated for the saved items before the "Custom fields" feature release) or an array of JSON objects containing the following fields:
key - string. Max length - 30 characters.
value - string. Max length - 200 characters.
It contains a list of all custom field values and keys associated with the item.
orderId
Integer
Shopify's numeric order ID.
autoGenerated
Boolean
False when new items were added during the order edit, i.e. via "Adjust quantity". True otherwise.
createdAt
UTC timestamp in ISO-8601 format, string representation
Date and time when the item was first saved in the app's database.
updatedAt
UTC timestamp in ISO-8601 format, string representation
Date and time the item was last updated in the app's database.
Last updated