Skip to content

Inbound Advance Shipping Notice API (1.0.0)

The Inbound Advance Shipping Notice API allows clients to notify our system when a shipment is inbound. The data sent will be used to receive and reconcile against.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://developer.optoro.com/_mock/openapi/asn/openapi
Production
https://asn.optiturn.com
Sandbox
https://asn.sandbox.optiturn.com
Staging
https://asn.stage.optiturn.com

Create an ASN

Request

Security
jwtAuth
Headers
api-versionstringrequired

There are currently two supported versions of the Inbound Advance Shipping Notice API. Version 2 adds support for the details.labels array. By default requests to the Inbound Advance Shipping Notice API will use version 1. To explicitly set which version of the API to use clients must set the api-version HTTP header.

Enum12
Example: 1
Bodyapplication/jsonrequired
program_identifierstringrequired

Identifies which program this ASN belongs to for operational processes, financials and reporting. The value will be provided by Optoro during implementation.

Example: "consumer_returns"
fromobject(From)required
from.​identifierstringrequired

Identifier for the from location visible in reporting. ie Numeric Warehouse ID, Store Number, Ecom

Example: 22
from.​typestringrequired

Type of the from location visible in reporting. ie Warehouse, Ecom, Returns Portal, Store

Example: "Warehouse"
toobject(To)required
to.​identifierstringrequired

Identifier for the to location visible in reporting. ie Numeric Warehouse ID, Store Number.

Example: 1352
to.​typestringrequired

Type of the to location visible in reporting. ie Warehouse, Store, Customer

Example: "Store"
asn_numberstringrequired

A reference number for this ASN, typically this is an RMA Number or Transfer Number. This must be unique per program identifier. This is a scannable identifier in Receiving.

Example: "SO00001234"
shipment_identifierstring

A reference number which may be used to identify multiple ASNs which were created against a single Order, RMA, or Transfer. This may be the order_identifier, the PO Number or the RMA Number. This is a scannable identifier in Receiving.

Example: "SI1ZAAAAAAZZ97764680"
tracking_numberstring

The tracking number or BOL for the shipment. This is a scannable identifier in Receiving.

Example: "1Z123123123123"
carrierstring

The carrier for the shipment.

Example: "UPS"
ship_datestring(date-time)

An iso8601 formatted date string representing when the ASN was or will be shipped (YYYY-MM-DDT00:00:00). This value can be updated using the ASN update endpoint.

Example: "2019-03-15T00:00:00Z"
statusstringrequired

This value can be updated using the update endpoint. Cancelled status will block receiving. *Note passing 'canceled' with one 'l' will not be recognized by our system.

Enum"pending""shipped""delivered""cancelled"
Example: "shipped"
details_typestringrequired
  • 'unit': details.unit_identifier must be provided and other per unit keys are allowed.
  • 'sku': details.sku and details.quantity keys required, per unit keys disallowed. Only one type is allowed to make matching during receiving manageable.
Enum"unit""sku"
Example: "unit"
asn_typestring

Optional, the type of ASN. Blanket type ASNs remove validations around units and overages.

Example: "MR"
cartonsArray of objects(Carton)required

Each object (carton) below represents a single box or pallet which has been shipped.

cartons[].​identifierstring

The scannable identifier for this carton which may be used in Receiving.

Example: "CTAA1234567"
cartons[].​referenceobject(Reference)
cartons[].​detailsArray of objects(Detail)required

The sku or unit lines expected in this carton.

cartons[].​details[].​line_identifierstringrequired

The systematic identifier for this line. For ecommerce parcel returns, this is typically the RMA line identifier or order line identifier. For Wholesale or Store returns this might be a specific identifier for the shipment line or you can pass '1' for the first line and then increment by '1' per additional line.

Example: 123456789
cartons[].​details[].​unit_identifierstring

If the details_type is 'unit', this attribute denotes the scannable identifier for this unit, which can be, used to match to the details.line_identifier during receiving. This value needs to be unique across all ASNs provided by the customer to Optoro.

Example: 123456891011
cartons[].​details[].​reference_line_identifierstring

This is an optional field for any additional scannable identifiers that could be on the line item that Optoro will match to the details.line_identifier during receiving. This could be used if there is a separate barcode on the product that is not a SKU or UPC barcode.

Example: 1
cartons[].​details[].​skustringrequired

The SKU for this item. Can be used to match to the details.line_identifier during receiving.

Example: "S123456"
cartons[].​details[].​upcstring

The UPC for this item. Only allows letters and numbers, whitespaces are not allowed.

Example: 12345678905
cartons[].​details[].​quantityintegerrequired

For unit type ASNs, this must be 1. For sku type ASNs, the number of items for this sku in this carton.

Example: 1
cartons[].​details[].​vendor_identifierstring

The identifier for this unit or SKU/quantity's vendor or supplier. This field is required if using Optoro's RTV Module. It is used for determining RTV eligibility and fulfillment.

Example: "vnd_3001"
cartons[].​details[].​serial_numberstring

Serial number for this unit. Only permitted on Unit type ASNs. Can be used to match to the details.line_identifierline during receiving. Only allows letters and numbers, whitespaces are not allowed.

Example: 12345689
cartons[].​details[].​conditionstring

Optional field denoting the condition of the product as reported by the transferring location. This will appear in Optoro's inbound and received shipments reporting.

Example: "N"
cartons[].​details[].​eligibility_flagsArray of strings

Optional array identifying specific flags about a unit used to determine eligibility for RTV. If one of these flags is present on the ASN and the vendor in Optoro's Vendor Management module has this flag 'checked' then the unit will be blocked from RTV.

Example: [["personalized"]]
cartons[].​details[].​sell_datestring(date-time)

Valid for unit type ASNs. An iso8601 formatted date string representing when the detail line was sold. Used for eligibility and dispositioning.

Example: "2021-01-10T00:00:00Z"
cartons[].​details[].​return_datestring(date-time)

Valid for unit type ASNs. An iso8601 formatted date string representing when the detail line was returned.

Example: "2021-01-10T00:00:00Z"
cartons[].​details[].​labelsArray of objects(Label)

Optional object array, used for customers to pass up to two specific values they want printed on labels at receiving or in the OptiTurn Rework Tool. This can be a barcode or a custom string. Currently only two values can be supported on the label print. Customers must be using version 2 of the API for this field.

cartons[].​details[].​merchantstring

The name of the merchant that sells the product. This field is required when a customer is processing returns for multiple merchants. It is used to uniquely identify the product when there is SKU or UPC overlap between merchants.

Example: "Best Buy"
cartons[].​details[].​conceptstring

The retail 'concept' or 'brand' to which the product belongs. This differentiates similar products when the customer's parent company has multiple retail brands. It is used to uniquely identify the product when there is SKU or UPC overlap within the same merchant.

Example: "Insignia"
cartons[].​details[].​asinstring

A 10-character alphanumeric unique identifier assigned to a product by Amazon.com and its partners. If there is a scannable ASIN on the unit of inventory this can be used to match to the details.line_identifier.

Example: 1234567890
cartons[].​details[].​return_reasonstring

This field can be used to identify a line item as a 'misship'. Your onboarding team can configure a setting to receive a unit with a SKU/UPC that is in your catalog but that does not match the ASN line if the 'misship' value is present. This value will be provided in the Inventory Receipt details.return_reason field.

Example: "Wrong Item Sent"
cartons[].​details[].​set_identifierstring

Optional field to group the items. This field is applicable only when the details_type is 'unit'.

Example: "SET-S123456"
messagetimestampstring(date-time)

Optional, a timestamp denoting when the ASN message was sent.

Example: "2019-10-16T10:59:20"
curl -i -X POST \
  https://developer.optoro.com/_mock/openapi/asn/openapi/asns \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'api-version: 1' \
  -d '{
    "program_identifier": "consumer_returns",
    "from": {
      "identifier": 22,
      "type": "Warehouse"
    },
    "to": {
      "identifier": 1352,
      "type": "Store"
    },
    "asn_number": "SO00001234",
    "shipment_identifier": "SI1ZAAAAAAZZ97764680",
    "tracking_number": "1Z123123123123",
    "carrier": "UPS",
    "ship_date": "2019-03-15T00:00:00Z",
    "status": "shipped",
    "details_type": "unit",
    "asn_type": "MR",
    "cartons": [
      {
        "identifier": "CTAA1234567",
        "reference": {
          "type": "RMA",
          "identifier": 12345,
          "alternate_identifier": "OR12345678"
        },
        "details": [
          {
            "line_identifier": 123456789,
            "unit_identifier": 123456891011,
            "reference_line_identifier": 1,
            "sku": "S123456",
            "upc": 12345678905,
            "quantity": 1,
            "vendor_identifier": "vnd_3001",
            "serial_number": 12345689,
            "condition": "N",
            "eligibility_flags": [
              [
                "personalized"
              ]
            ],
            "sell_date": "2021-01-10T00:00:00Z",
            "return_date": "2021-01-10T00:00:00Z",
            "labels": [
              {
                "type": "text",
                "name": "title",
                "value": "Printing this title"
              }
            ],
            "merchant": "Best Buy",
            "concept": "Insignia",
            "asin": 1234567890,
            "return_reason": "Wrong Item Sent",
            "set_identifier": "SET-S123456"
          }
        ]
      }
    ],
    "messagetimestamp": "2019-10-16T10:59:20"
  }'

Responses

The ASN API will return a HTTP status code 202 to indicate that the request was processed successfully and that the provided ASN is queued for creation.

Response
No content

Update an ASN

Request

ASNs may be updated to change the status of the ASN overall or the status of a detail line. See above for permitted status values. ASN Number should be included as part of the url. ASNs can be updated only when they are active and have no receptions.

Security
jwtAuth
Path
asn-numberstringrequired
Example: SO00001234
Headers
api-versionstringrequired

There are currently two supported versions of the Inbound Advance Shipping Notice API. Version 2 adds support for the details.labels array. By default requests to the Inbound Advance Shipping Notice API will use version 1. To explicitly set which version of the API to use clients must set the api-version HTTP header.

Enum12
Example: 1
Bodyapplication/jsonrequired
program_identifierstringrequired

Identifies which program this ASN belongs to for operational processes, financials and reporting. The value will be provided by Optoro during implementation.

Example: "consumer_returns"
fromobject(From)required
from.​identifierstringrequired

Identifier for the from location visible in reporting. ie Numeric Warehouse ID, Store Number, Ecom

Example: 22
from.​typestringrequired

Type of the from location visible in reporting. ie Warehouse, Ecom, Returns Portal, Store

Example: "Warehouse"
toobject(To)required
to.​identifierstringrequired

Identifier for the to location visible in reporting. ie Numeric Warehouse ID, Store Number.

Example: 1352
to.​typestringrequired

Type of the to location visible in reporting. ie Warehouse, Store, Customer

Example: "Store"
asn_numberstringrequired

A reference number for this ASN, typically this is an RMA Number or Transfer Number. This must be unique per program identifier. This is a scannable identifier in Receiving.

Example: "SO00001234"
shipment_identifierstring

A reference number which may be used to identify multiple ASNs which were created against a single Order, RMA, or Transfer. This may be the order_identifier, the PO Number or the RMA Number. This is a scannable identifier in Receiving.

Example: "SI1ZAAAAAAZZ97764680"
tracking_numberstring

The tracking number or BOL for the shipment. This is a scannable identifier in Receiving.

Example: "1Z123123123123"
carrierstring

The carrier for the shipment.

Example: "UPS"
ship_datestring(date-time)

An iso8601 formatted date string representing when the ASN was or will be shipped (YYYY-MM-DDT00:00:00). This value can be updated using the ASN update endpoint.

Example: "2019-03-15T00:00:00Z"
statusstringrequired

This value can be updated using the update endpoint. Cancelled status will block receiving. *Note passing 'canceled' with one 'l' will not be recognized by our system.

Enum"pending""shipped""delivered""cancelled"
Example: "shipped"
details_typestringrequired
  • 'unit': details.unit_identifier must be provided and other per unit keys are allowed.
  • 'sku': details.sku and details.quantity keys required, per unit keys disallowed. Only one type is allowed to make matching during receiving manageable.
Enum"unit""sku"
Example: "unit"
asn_typestring

Optional, the type of ASN. Blanket type ASNs remove validations around units and overages.

Example: "MR"
cartonsArray of objects(Carton)required

Each object (carton) below represents a single box or pallet which has been shipped.

cartons[].​identifierstring

The scannable identifier for this carton which may be used in Receiving.

Example: "CTAA1234567"
cartons[].​referenceobject(Reference)
cartons[].​detailsArray of objects(Detail)required

The sku or unit lines expected in this carton.

cartons[].​details[].​line_identifierstringrequired

The systematic identifier for this line. For ecommerce parcel returns, this is typically the RMA line identifier or order line identifier. For Wholesale or Store returns this might be a specific identifier for the shipment line or you can pass '1' for the first line and then increment by '1' per additional line.

Example: 123456789
cartons[].​details[].​unit_identifierstring

If the details_type is 'unit', this attribute denotes the scannable identifier for this unit, which can be, used to match to the details.line_identifier during receiving. This value needs to be unique across all ASNs provided by the customer to Optoro.

Example: 123456891011
cartons[].​details[].​reference_line_identifierstring

This is an optional field for any additional scannable identifiers that could be on the line item that Optoro will match to the details.line_identifier during receiving. This could be used if there is a separate barcode on the product that is not a SKU or UPC barcode.

Example: 1
cartons[].​details[].​skustringrequired

The SKU for this item. Can be used to match to the details.line_identifier during receiving.

Example: "S123456"
cartons[].​details[].​upcstring

The UPC for this item. Only allows letters and numbers, whitespaces are not allowed.

Example: 12345678905
cartons[].​details[].​quantityintegerrequired

For unit type ASNs, this must be 1. For sku type ASNs, the number of items for this sku in this carton.

Example: 1
cartons[].​details[].​vendor_identifierstring

The identifier for this unit or SKU/quantity's vendor or supplier. This field is required if using Optoro's RTV Module. It is used for determining RTV eligibility and fulfillment.

Example: "vnd_3001"
cartons[].​details[].​serial_numberstring

Serial number for this unit. Only permitted on Unit type ASNs. Can be used to match to the details.line_identifierline during receiving. Only allows letters and numbers, whitespaces are not allowed.

Example: 12345689
cartons[].​details[].​conditionstring

Optional field denoting the condition of the product as reported by the transferring location. This will appear in Optoro's inbound and received shipments reporting.

Example: "N"
cartons[].​details[].​eligibility_flagsArray of strings

Optional array identifying specific flags about a unit used to determine eligibility for RTV. If one of these flags is present on the ASN and the vendor in Optoro's Vendor Management module has this flag 'checked' then the unit will be blocked from RTV.

Example: [["personalized"]]
cartons[].​details[].​sell_datestring(date-time)

Valid for unit type ASNs. An iso8601 formatted date string representing when the detail line was sold. Used for eligibility and dispositioning.

Example: "2021-01-10T00:00:00Z"
cartons[].​details[].​return_datestring(date-time)

Valid for unit type ASNs. An iso8601 formatted date string representing when the detail line was returned.

Example: "2021-01-10T00:00:00Z"
cartons[].​details[].​labelsArray of objects(Label)

Optional object array, used for customers to pass up to two specific values they want printed on labels at receiving or in the OptiTurn Rework Tool. This can be a barcode or a custom string. Currently only two values can be supported on the label print. Customers must be using version 2 of the API for this field.

cartons[].​details[].​merchantstring

The name of the merchant that sells the product. This field is required when a customer is processing returns for multiple merchants. It is used to uniquely identify the product when there is SKU or UPC overlap between merchants.

Example: "Best Buy"
cartons[].​details[].​conceptstring

The retail 'concept' or 'brand' to which the product belongs. This differentiates similar products when the customer's parent company has multiple retail brands. It is used to uniquely identify the product when there is SKU or UPC overlap within the same merchant.

Example: "Insignia"
cartons[].​details[].​asinstring

A 10-character alphanumeric unique identifier assigned to a product by Amazon.com and its partners. If there is a scannable ASIN on the unit of inventory this can be used to match to the details.line_identifier.

Example: 1234567890
cartons[].​details[].​return_reasonstring

This field can be used to identify a line item as a 'misship'. Your onboarding team can configure a setting to receive a unit with a SKU/UPC that is in your catalog but that does not match the ASN line if the 'misship' value is present. This value will be provided in the Inventory Receipt details.return_reason field.

Example: "Wrong Item Sent"
cartons[].​details[].​set_identifierstring

Optional field to group the items. This field is applicable only when the details_type is 'unit'.

Example: "SET-S123456"
messagetimestampstring(date-time)

Optional, a timestamp denoting when the ASN message was sent.

Example: "2019-10-16T10:59:20"
curl -i -X PUT \
  https://developer.optoro.com/_mock/openapi/asn/openapi/asns/SO00001234 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'api-version: 1' \
  -d '{
    "program_identifier": "consumer_returns",
    "from": {
      "identifier": 22,
      "type": "Warehouse"
    },
    "to": {
      "identifier": 1352,
      "type": "Store"
    },
    "asn_number": "SO00001234",
    "shipment_identifier": "SI1ZAAAAAAZZ97764680",
    "tracking_number": "1Z123123123123",
    "carrier": "UPS",
    "ship_date": "2019-03-15T00:00:00Z",
    "status": "shipped",
    "details_type": "unit",
    "asn_type": "MR",
    "cartons": [
      {
        "identifier": "CTAA1234567",
        "reference": {
          "type": "RMA",
          "identifier": 12345,
          "alternate_identifier": "OR12345678"
        },
        "details": [
          {
            "line_identifier": 123456789,
            "unit_identifier": 123456891011,
            "reference_line_identifier": 1,
            "sku": "S123456",
            "upc": 12345678905,
            "quantity": 1,
            "vendor_identifier": "vnd_3001",
            "serial_number": 12345689,
            "condition": "N",
            "eligibility_flags": [
              [
                "personalized"
              ]
            ],
            "sell_date": "2021-01-10T00:00:00Z",
            "return_date": "2021-01-10T00:00:00Z",
            "labels": [
              {
                "type": "text",
                "name": "title",
                "value": "Printing this title"
              }
            ],
            "merchant": "Best Buy",
            "concept": "Insignia",
            "asin": 1234567890,
            "return_reason": "Wrong Item Sent",
            "set_identifier": "SET-S123456"
          }
        ]
      }
    ],
    "messagetimestamp": "2019-10-16T10:59:20"
  }'

Responses

The ASN API will return a HTTP status code 202 to indicate that the request was processed successfully and that the provided ASN is queued for creation.

Response
No content