Follow

Base URL

HTTP Methods

The StrikeAd campaign API supports the HTTP POST, PUT and GET methods.

HTTP Web CRUD Response codes for the entire collection
(For example, campaigns)
Response codes for specific items
(For example, campaigns/[id])
POST Create 201 (Created), 'Location' header with link to /campaigns/{id} containing the new ID. 404 (Not Found), 400 (Bad Request) if resource already exists.
GET Read 200 (OK), list of customers. Use pagination, sorting and filtering to navigate big lists. 200 (OK), single campaign. 404 (Not Found), if ID not found or invalid.
PUT Update/Replace 404 (Not Found). 200 (OK) or 204 (No Content). 404 (Not Found), if ID not found or invalid.
PATCH Partial Update Not supported 200(OK)

The campaign API does not support the PATCH and DELETE HTTP methods.

HTTP Status codes

Status Code Description
200 OK

The request completed successfully. The information returned with the response varies according to the method used in the request. For example:

  • GET: An entity corresponding to the requested resource is sent in the response.
  • HEAD: The entity-header fields corresponding to the requested resource are sent in the response without any message-body.
  • POST: An entity describing or containing the result of the action.
201 Created

The request completed successfully, and a new resource was created. The new resource can be referenced by the URIs returned in the entity of the response, with the most specific URI for the resource given by a Location header field.

204 No content

The server completed the request successfully, but does not need to return an entity-body, and may want to return updated meta-information. The response MAY include new or updated meta-information in the form of entity-headers, which if present SHOULD be associated with the requested variant.

400 Bad Request

The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

401 Unauthorized

The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource

403 Forbidden

The server understood the request, but refused to fulfill it as the user is not authorized to access the resource or run the appropriate action. Authorization will not help and the request SHOULD NOT be repeated.

404 Not found

The server has not found anything that matches the Request-URI. There is no indication if the condition is temporary or permanent. 

503 Service Unavailable

The server is currently unable to handle the request due to temporary overloading or maintenance of the server. The implication is that this is a temporary condition that will be resolved after some delay. 

URL Parsing rules

URL structure: 

  1. <Baste_URL>/<version>/<resource>/<ID>
    • <version>: Requested API version.
    • <resource>: Resource name (plural, noun). If called without a specific ID, all available resource IDs are retrieved from the server.
    • <ID>: ID of the particular resource to retrieve data (GET), or update data (POST). To create a resource use the "create" method with POST JSON data.
    • EXAMPLE: https://api-staging.strikead.com/v1.1/campaigns/4909
  2. <Baste_URL>/<version>/<resource>/<sub-resource>/<ID>
    • <version>: Requested API version.
    • <resource>: Resource name (plural, noun). if called without a specific ID, all available resource IDs are retrieved from the server.
    • <sub-resource>: Sub-resource of the particular resource.
    • <ID>: Some sub resources may have an ID>.
    • EXAMPLE: profile/quotas, dictionary/countries, segments/1st-party/234.

HTTP Header fields

Header Field Description
Location The Location response header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource.
Accept The Accept request header field can be used by the client to specify certain media types that are acceptable for the response.
Content-Type The Content-Type entity header field indicates the media type of the entity body sent to the recipient, or in the case of the HEAD method, the media type that would have been sent had the request been a GET.
Content-type
Content-Type: application/json
X-Authorization: f3d00d3e34c0c05c27637c62d3f29e77
 X-Authorization  A user agent that wants to authenticate itself with a server usually, but not necessarily, after receiving a 401 response, does so by including an Authorization request header field with the request. The X-Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk