ticketing > Tickets

Exchange For Coupon

Changed on

Exchanges a ticket for a coupon, which can be used for discounts on future purchases. This endpoint is used when a customer opts to convert their ticket into a coupon, providing multiple value retention options. The ticket is validated, and a coupon is issued, providing value retention for the customer.

post/{tenant}/{environment}/{company}/ticket/{ticketId}/exchangeForCoupon

Request

  • Base URL
    https://api.npretail.app
  • Auth
    API key in header x-np-api-key

Path parameters

tenantstring required

Your Entra Tenant ID. More details.

environmentstring required

Your Business Central Environment. More details.

companystring required

Your Business Central Company. More details.

ticketIdstring uuid required

The unique identifier of a ticket

Headers

x-api-versionstring date

Used for API versioning. More details.

Request body

couponTypestring

The type of coupon

Response

Response with status 200

couponIdstring uuid required

The unique identifier of a coupon

couponNumberstring required

The external reference number of the coupon.

couponTypestring

The type of coupon

Changes

    • breaking

      the request's body type changed from no type to object

    • breaking

      the response's body type changed from no type to object for status

    • warning

      deleted the header request parameter x-np-api-key

    • info

      the endpoint scheme security NPApiKeyAuthScheme was added to the API

    • info

      added the new optional request property

    • info

      for the path request parameter ticketId, the type was generalized from no type to string, and format from no format to uuid

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      api operation id exchange-for-coupon removed and replaced with ticketing_serviceTicket_exchangeForCoupon