Skip Navigation
Tags — Create

Tags — Create

For a higher-level overview, see Registry.

Overview

  • POST /tags allows users to register tags without associating them to any item data.
  • Tag Issuer Code and Tag Type ID as specified under the EPC Version 2 layout will be validated against calling user’s account.
    • Contact Kit Check to get your Tag Issuer Id and register your Tag Type ID(s).
  • This endpoint should be able to handle creating 10,000 tags in a single request.
  • In the event of an error, none of the tags submitted in the API call will be created.

Request

Method

POST {registry}/api/v1/tags

Header

Example Header

http-api-key: token
Content-Type: application/json

NOTE: Token should be replaced with your actual API token.

Body

Parameters

Field Type Description
tags Object[] Required. Array of Tag objects.
   epc String Required. EPC of the tag (must be an EPC that follows the Version 2 layout).

Accepts 24 hex characters.

   tid String Optional. TID of the tag.

Accepts 24 hex characters.

tag_roll_value String Optional. External identifier for the Tag Roll.

Example Body

{
  "tags":[
    {"epc": "800200010000000000000008", "tid": "a90a796b5a43688341318743"},
    {"epc": "800200010000000000000009", "tid": "0de6d45a1ad95e3017eff59b"}
  ],
  "tag_roll_value": "roll 11"
}

Response

Header

The response header will supply a standard HTTP status code. Currently, the following are supported for application-specific errors.

  • 200 OK – The request has succeeded. See below for an example response.
  • 401 Unauthorized – A session or authentication error such as a bad token, session timeout, etc.
  • 403 Forbidden – You don’t have permission to perform that action.
  • 404 Not Found – The server can not find requested resource. This usually means that the URL is not recognized.
  • 422 Unprocessable Entity – The arguments supplied were wrong or unexpected in some way. This might include missing/wrong variables, EPCs that are already associated, invalid data types such as a supplying a date in a boolean field, etc.
  • 500 Internal Server Error – The server encountered an unexpected condition which prevented it from fulfilling the request.

You may still received other error codes, for example other 5xx codes for Server errors. But those aren’t specific to the business logic of this endpoint.

Body

Example Body — 200 Success

In the event of a 200, information will be returned in the body so you can perform additional validations.

{
  "tags": [
    {"epc": "800200010000000000000008", "tid": "a90a796b5a43688341318743"},
    {"epc": "800200010000000000000009", "tid": "0de6d45a1ad95e3017eff59b"}
  ],
  "tag_roll_value": "roll 11"
}

Example Body — 4xx and 5xx Errors

In the event of a non-200 response status (see description in Response Header above), additional information about the error can be found in the response body.

Make sure to log the error IDs so that Kit Check can help you troubleshoot more efficiently.

{
  "errors" : [
    {
      "status": 422,
      "detail": "A human-readable description of the error",
      "id": "32f63f5f-0936-4446-864f-8742763a80c5"
    }
  ]
}