REST API Quick Reference

Quick reference information is provided for:

Request

A request consists of:

Request URL

All REST API requests must comply with the following requirements:

Requirement Description

Protocol

HTTPS

Hostname

api.transactcdn.com

Variables

Make sure to replace italicized URL segments with the proper data (e.g., customer account number).

Additionally, make sure to specify the correct HTTP method as it determines how the request will be interpreted.

HTTP Method Description

DELETE

Deletes the referenced object (e.g., edge CNAME).

GET

Retrieves information about the referenced object.

POST

Creates a new object.

PUT

Updates the properties associated with an existing object.

Request Headers

Make sure to include the following headers when submitting a request to our REST API service.

Request header names and values are case-insensitive.

Header Name Description

Authorization

Identifies the requester and provides authorization to perform the requested action.

Set this header to your REST API token using the following format:

TOK: Token

Sample value:

Authorization: TOK: 12345678-1234-1234-1234-1234567890ab

Accept

Identifies the format for the response body (i.e., JSON or XML).

Syntax (JSON):

Accept: Application/json

Syntax (XML):

Accept: Application/xml

Content-Type

Identifies the format for the request body (i.e., JSON or XML). This request header is unnecessary for GET requests.

Syntax (JSON):

Content-Type: Application/json

Syntax (XML):

Content-Type: Application/xml

Host

Indicates the host to which the request is being posted.

Host: api.transactcdn.com

Request Body

Key information:

Response

Quick reference information is provided for:

200 OK HTTP Status Code

A 200 OK HTTP status code indicates that the requested endpoint was successfully processed by our servers.

The proper response for a successful request can be an empty response body. An empty response body is returned when:

Response Headers

The response from our Web Services REST API service should include the following headers.

Header Name Description

Cache-Control

Indicates that the cache-control for the response body is "private."

Content-Length

Indicates the number of bytes in the response body.

Content-Type

Indicates the format of the response body. This header will report one of the following values:

  • JSON: Application/json
  • XML: Application/xml

Date

Identifies the date and time (UTC) at which the request was processed.

Response Body

Key information:

Troubleshooting

Use the HTTP status code to determine why a request was denied.

400 Bad Request

Checklist

Verify that the request references your customer account numberIdentifies a customer by a system-defined account number (e.g., 0001). This account number consists of alphanumeric characters. A customer's account number is displayed in the upper-right hand corner of the MCC..

Verify that your customer account is in good standing (i.e., Active status).

Verify that the Authorization header references a valid token.

Verify the request body's format matches the Content-Type header value.

Verify all characters in the request URL are URL encoded.

Verify that the request includes all required request body parameters.

Validate all request body parameters.

Verify that each request body parameter included in the request is set to a valid and properly formatted value.

Verify that required request body parameters are not set to a blank value.

403 Forbidden

Checklist

Verify that the Authorization header references a valid token using the following syntax:

Verify that the specified token does not include additional characters (e.g, quotes).

Verify that the request references a valid customer account number.

Verify that your user account has sufficient privileges to perform the requested action. Specifically, your user account must be granted the HTTP methodRefers to the type of action being requested. Our REST API supports the use of the following methods: GET, POST, PUT, and DELETE. being requested and sufficient user privileges to perform the equivalent action within the TCC.

Perform a case-comparison between the request URL and the endpoint defined in the documentation.

404 Not Found

Checklist

Compare the request URL to the endpoint defined in the documentation.

405 Method Not Allowed

Checklist

409 Conflict

Checklist

Verify that resource being created doesn't already exist.

500 Internal Server Error

Checklist

Verify that the request URL is properly formatted.