GiftCertificate Resource (Shop API 15.8)

Summary

Http Method Resource Description
POST /Gift_certificate Action to retrieve an existing gift certificate.

Get Gift Certificate

Action to retrieve an existing gift certificate.

Url

POST https://hostname:port/dw/shop/v15_8/gift_certificate

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.
OAuth Authentication via OAuth token.

Request Document

GiftCertificateRequest

Response Document

GiftCertificate

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 NotFoundException   Thrown if the given gift certificate code is not valid.

Sample

REQUEST:
POST /dw/shop/v15_8/gift_certificate HTTP/1.1
Host: example.com
Accept: application/json
{
    gift_certificate_code:"123456789012"
}

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 303
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "15.8",
   "_type" : "gift_certificate",
   "balance" : 30.00,
   "description" : "Enabled gift certificate",
   "enabled" : true,
   "masked_gift_certificate_code" : "********9012",
   "merchant_id" : "00000001",
   "message" : "...",
   "recipient_email" : "[email protected]",
   "recipient_name" : "Joe Doe",
   "status" : "pending"
}


# in case of failure:

HTTP/1.1 404 NOT FOUND
Cache-Control: no-cache,no-store,must-revalidate
Expires: Thu, 01-Jan-1970 00:00:00 GMT
{
   "_v" : "15.8",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "The gift certificate with the given code could not be retrieved."
   }
}
OCAPI obsolete versions 13.x and 14.x will be end of life in 2020 and versions 15.x and 16.x in 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.