This API is called to apply promocodes on a reservation.
Promocode Functionality:
To add a promocode to the Cart / Reservation, add the applicable promocode to the query. The promocode will automatically be added to the Cart and the updated prices will be returned in the response.
There could be multiple reasons for a promocode to be declined. For example, insufficient cart balance, expired, already used etc. In this case an error INVALID_PROMOCODE will be returned with a customer friendly message which can be shown on your front-end.
Authorizations
Path parameters
reservation_referencestring · min: 8Required
A unique identifier got in response of the reservation_reference API.
Example: ORDRREF123456
Query parameters
promo_codestringRequired
The promocode which should be applied to the cart.
Example: PROMOCODE_123
Responses
200
Promocode Added
application/json
400
Invalid Request
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
application/json
401
Authentication Failed
The access token provided is expired, revoked, malformed, or invalid for other reasons. The resource SHOULD respond with the HTTP 401 (Unauthorized) status code. The client MAY request a new access token and retry the protected resource request.
application/json
403
Forbidden
The request requires higher privileges than provided by the access token. The resource server SHOULD respond with the HTTP 403 (Forbidden) status code and MAY include the `scope` attribute with the scope necessary to access the protected resource.
application/json
405
Method Not Allowed
The HyperText Transfer Protocol (HTTP) 405 Method Not Allowed response status code indicates that the request method is known by the server but is not supported by the target resource.
A request method is not supported for the requested
resource; for example, a GET request on a form that
requires data to be presented via POST, or a PUT request
on a read-only resource.
application/json
406
Not Acceptable
The HyperText Transfer Protocol (HTTP) 406 Not Acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation.
application/json
409
Conflict
The HTTP 409 Conflict response status code indicates a request conflict with current state of the server.
Conflicts are most likely to occur in response to a PUT request. For example, you may get a 409 response when trying to pay an order which is already cancelled on the server, resulting in a version control conflict.
application/json
422
Unprocessable Entity
The HyperText Transfer Protocol (HTTP) 422 Unprocessable Entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
application/json
429
Too Many Requests
The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting").
application/json
500
Internal Server Error
The HyperText Transfer Protocol (HTTP) 500 Internal Server Error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
application/json
501
Not Implemented
The HyperText Transfer Protocol (HTTP) 501 Not Implemented server error response code means that the server does not support the functionality required to fulfill the request.
The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability (e.g., a new feature of a web-service API).
application/json
502
Bad Gateway
The HyperText Transfer Protocol (HTTP) 502 Bad Gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.
The HTTP 502 Bad Gateway error is exclusively returned in case of problems during communication with the supplier or third-party system.
application/json
503
Service Unavailable
The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code indicates that the server is not ready to handle the request.
The HTTP 503 Service Unavailable error is exclusively returned in case of problems during internal communication.
application/json
504
Gateway Timeout
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.
The HTTP 504 Gateway Timeout error is exclusively returned in case of problems during communication with the supplier or third-party system.
application/json
post
POST /v3.8/distributor/reservations/{reservation_reference}/promocode HTTP/1.1
Host: staging-distributor-api.prioticket.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
This API is called to remove an applied promocode on a reservation.
If a DELETE method is successfully applied, the origin server SHOULD send a 200 (Promocode Removed) status code if the action has been enacted. The new reservation will be returned with the updated prices.
If a promocode or an existing order applied with a promocode is cancelled, the use count will be restored.
Authorizations
Path parameters
reservation_referencestring · min: 8Required
A unique identifier got in response of the reservation API.
Example: RESREF123
promo_codestringRequired
The promocode which should should be removed from the cart.
Example: PROMOCODE_123
Responses
200
Promocode Removed
application/json
400
Invalid Request
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
application/json
401
Authentication Failed
The access token provided is expired, revoked, malformed, or invalid for other reasons. The resource SHOULD respond with the HTTP 401 (Unauthorized) status code. The client MAY request a new access token and retry the protected resource request.
application/json
403
Forbidden
The request requires higher privileges than provided by the access token. The resource server SHOULD respond with the HTTP 403 (Forbidden) status code and MAY include the `scope` attribute with the scope necessary to access the protected resource.
application/json
405
Method Not Allowed
The HyperText Transfer Protocol (HTTP) 405 Method Not Allowed response status code indicates that the request method is known by the server but is not supported by the target resource.
A request method is not supported for the requested
resource; for example, a GET request on a form that
requires data to be presented via POST, or a PUT request
on a read-only resource.
application/json
406
Not Acceptable
The HyperText Transfer Protocol (HTTP) 406 Not Acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation.
application/json
409
Conflict
The HTTP 409 Conflict response status code indicates a request conflict with current state of the server.
Conflicts are most likely to occur in response to a PUT request. For example, you may get a 409 response when trying to pay an order which is already cancelled on the server, resulting in a version control conflict.
application/json
422
Unprocessable Entity
The HyperText Transfer Protocol (HTTP) 422 Unprocessable Entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
application/json
429
Too Many Requests
The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting").
application/json
500
Internal Server Error
The HyperText Transfer Protocol (HTTP) 500 Internal Server Error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
application/json
501
Not Implemented
The HyperText Transfer Protocol (HTTP) 501 Not Implemented server error response code means that the server does not support the functionality required to fulfill the request.
The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability (e.g., a new feature of a web-service API).
application/json
502
Bad Gateway
The HyperText Transfer Protocol (HTTP) 502 Bad Gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.
The HTTP 502 Bad Gateway error is exclusively returned in case of problems during communication with the supplier or third-party system.
application/json
503
Service Unavailable
The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code indicates that the server is not ready to handle the request.
The HTTP 503 Service Unavailable error is exclusively returned in case of problems during internal communication.
application/json
504
Gateway Timeout
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.
The HTTP 504 Gateway Timeout error is exclusively returned in case of problems during communication with the supplier or third-party system.