Tags

Tag customers to better organize your data.

Retrieve a list of tags

Retrieve a list of tags.

Request
Security:
query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

q
string

The partial search of the text fields.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200A list of tags was retrieved successfully.
Response Headers
Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

Response Schema: application/json
Array
id
string <= 50 characters

The tag's identifier string.

name
required
string <= 255 characters ^[@~\-\.\w\s]+$

The tag is unique name, which is case-insensitive.

createdTime
string <date-time>

The tag's created time.

updatedTime
string <date-time>

The tag's updated time.

Array of SelfLink (object) non-empty

The links related to resource.

401Unauthorized access, invalid credentials was used.
403Access forbidden.
get/tags
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/tags?limit=1000&offset=0&filter=string&q=string&sort=string' \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Create a tag

Create a tag.

Request
Security:
header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Tag resource.

name
required
string <= 255 characters ^[@~\-\.\w\s]+$

The tag is unique name, which is case-insensitive.

Responses
201Tag was created.
Response Schema: application/json
id
string <= 50 characters

The tag's identifier string.

name
required
string <= 255 characters ^[@~\-\.\w\s]+$

The tag is unique name, which is case-insensitive.

createdTime
string <date-time>

The tag's created time.

updatedTime
string <date-time>

The tag's updated time.

Array of SelfLink (object) non-empty

The links related to resource.

401Unauthorized access, invalid credentials was used.
403Access forbidden.
409Conflict.
422Invalid data was sent.
post/tags
Request samples
application/json
{
  • "name": "New"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "New",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve a tag

Retrieve a tag.

Request
Security:
path Parameters
tag
required
string^[@~\-\.\w\s]+$

The tag name.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200Tag with specified name was retrieved successfully.
Response Schema: application/json
id
string <= 50 characters

The tag's identifier string.

name
required
string <= 255 characters ^[@~\-\.\w\s]+$

The tag is unique name, which is case-insensitive.

createdTime
string <date-time>

The tag's created time.

updatedTime
string <date-time>

The tag's updated time.

Array of SelfLink (object) non-empty

The links related to resource.

401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/tags/{tag}
Request samples
curl -i -X GET \
  https://api-sandbox.rebilly.com/tags/:tag \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "New",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Update a tag

Update a tag.

Request
Security:
path Parameters
tag
required
string^[@~\-\.\w\s]+$

The tag name.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Tag resource.

name
required
string <= 255 characters ^[@~\-\.\w\s]+$

The tag is unique name, which is case-insensitive.

Responses
200Tag was updated.
Response Schema: application/json
id
string <= 50 characters

The tag's identifier string.

name
required
string <= 255 characters ^[@~\-\.\w\s]+$

The tag is unique name, which is case-insensitive.

createdTime
string <date-time>

The tag's created time.

updatedTime
string <date-time>

The tag's updated time.

Array of SelfLink (object) non-empty

The links related to resource.

401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
409Conflict.
422Invalid data was sent.
patch/tags/{tag}
Request samples
application/json
{
  • "name": "New"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "New",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Delete a tag

Delete a tag. It's an asynchronous operation.

Request
Security:
path Parameters
tag
required
string^[@~\-\.\w\s]+$

The tag name.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
204Tag was deleted.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
delete/tags/{tag}
Request samples
curl -i -X DELETE \
  https://api-sandbox.rebilly.com/tags/:tag \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}

Tag a list of customers

Tag a list of customers. If the customer from the list is already tagged it will be ignored. It's an asynchronous operation.

Request
Security:
path Parameters
tag
required
string^[@~\-\.\w\s]+$

The tag name.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json
customerIds
required
Array of strings [ 1 .. 1000 ] items

The list of customer IDs.

Responses
204Customers was tagged.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
422Invalid data was sent.
post/tags/{tag}/customers
Request samples
application/json
{
  • "customerIds": [
    ]
}
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}

Untag a list of customers

Untag a list of customers. If the customer from the list is already untagged it will be ignored. It's an asynchronous operation.

Request
Security:
path Parameters
tag
required
string^[@~\-\.\w\s]+$

The tag name.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json
customerIds
required
Array of strings [ 1 .. 1000 ] items

The list of customer IDs.

Responses
204Customers was untagged.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
422Invalid data was sent.
delete/tags/{tag}/customers
Request samples
application/json
{
  • "customerIds": [
    ]
}
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}

Tag a customer

Tag a customer.

Request
Security:
path Parameters
tag
required
string^[@~\-\.\w\s]+$

The tag name.

customerId
required
string <= 50 characters ^[@~\-\.\w]+$

The customer identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
204Customer was tagged.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
post/tags/{tag}/customers/{customerId}
Request samples
curl -i -X POST \
  https://api-sandbox.rebilly.com/tags/:tag/customers/:customerId \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}

Untag a customer

Untag a customer.

Request
Security:
path Parameters
tag
required
string^[@~\-\.\w\s]+$

The tag name.

customerId
required
string <= 50 characters ^[@~\-\.\w]+$

The customer identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
204Customer was untagged.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
delete/tags/{tag}/customers/{customerId}
Request samples
curl -i -X DELETE \
  https://api-sandbox.rebilly.com/tags/:tag/customers/:customerId \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}