Identifiers
Identifier Properties.

Explanation of Identifier Properties in Models

Each Identifier property within a model declares a reference to another resource.

For example, consider this Order snippet:

{
  "readOnly": {
    "batchIdentifier": {
      "nameKey": {
        "customerIdentifier": {"externalId": "eid", "name": "nm", "id": 3},
        "name": "bnm"
      },
      "id": 1
    },
    "customerIdentifier": {"externalId": "eid", "name": "nm", "id": 3},
    "facilityIdentifier": {"name": "fac", "id": 2},
    "createdByIdentifier": {"name": "usr", "id": 4},
    "lastModifiedByIdentifier": {"name": "us2", "id": 5}
  },
  "referenceNum": "ref#",
  "unit1Identifier": {"name": "Each", "id": 1}
}

Observing the json above, we see the customerIdentifier provides 3 alternate keys to the customer record: externalId, name, or id.

The facilityIdentifier provides 2: name, or id.

However, though the batchIdentifier provides 2 alternates, the nameKey alternate is a complex type consisting of a customerIdentifier and a name because batch names are unique within customer.

Get vs. PUT/POST

GET requests return identifiers fully populated with all alternatives.

However, PUT and POST require only one alternative. The id is always preferred to the other alternatives. Do not specify the id if you want another alternative to take precedence for resolving a reference to a particular record.

Contact Info special case

When contained in an Order or PurchaseOrder model, the ContactInfo property is similar to an Identifier, meaning it can identify an existing contact.

Within an Order or PurchaseOrder, it can be used to create a new contact if id or code is not specified.

Other instances of ContactInfo, such as Customer.CompanyInfo, Facility.Contact, and ThreePl.CompanyInfo, it is always used to create the initial contact record, with subsequent PUTs updating this record.

This documentation is subject to change, and is updated often and without warning. The models documented may or may not be available to users now or in the future. Use this documentation at your own risk.
Contact api@3plcentral.com with any questions about this documentation.