Background image
a-webshop.com
menu
My pages a-webshop.com
Startpage // Web API reference // Gift cards, Web API

Gift cards, Web API

| Added: 8 May 2015 | Updated: 8 May 2015
| Rating: 0 | Votes: 0 | Pageviews: 1076 | Comments (0)
This is a Web API reference for gift cards. You can add, update, get and delete gift cards with this API. A gift card can be used to pay for one or more orders, you can distribute gift cards to current and future customers. A gift card can be added by a customer in the check out of the webshop. A gift card is bound to a language and a currency, a gift card can only be applied on domains that have the language and the currency that is stated for the gift card.

Model - GiftCard

Property
Type
Description
id
string(50)
The unique id of the gift card, the code that is entered by the customer to add the gift card in the check out.
language_id
Int32
The id of the language that this gift card is valid for.
currency_code
string(3)
The currency code of the currency that this gift card is valid for.
amount
decimal(14, 0)
The monetary amount of the gift card, applies to the selected currency.
end_date
DateTime
The date and time when this gift card not is valid anymore.

Add a post [HttpPost]

Add a gift card post, you need to set the id of the model. Send a serialized version of the model (JSON, XML) to the url of the method.

Trust: API_FULL_TRUST
Url: /api/gift_cards/add
Example: /api/gift_cards/add
Returns: A HttpResponseMessage with a status code and a message

Update a post [HttpPut]

Update a gift card post, set the id of the gift card and send a serialized version of the model (JSON, XML) to the url of the method.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST
Url: /api/gift_cards/update
Example: /api/gift_cards/update
Returns: A HttpResponseMessage with a status code and a message

Get the count of posts by a search [HttpGet]

Get the count of posts by search keywords separated by space.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST,API_MINIMAL_TRUST
Url: /api/gift_cards/get_count_by_search?keywords=[keywords]
[keywords]: An url encoded string with keywords separated by space (string)
Example: /api/gift_cards/get_count_by_search?keywords=one%20two
Returns: The count of posts as an Int32

Get a post by id [HttpGet]

Get a serialized model of a gift card by id.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST,API_MINIMAL_TRUST
Url: /api/gift_cards/get_by_id/[id]
[id]: The id of a gift card (string)
Example: /api/gift_cards/get_by_id/SSSWWW
Returns: A serialized model of a gift card

Get all posts [HttpGet]

Get a serialized list with models of all gift cards.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST,API_MINIMAL_TRUST
Url: /api/gift_cards/get_all?sortField=[sort_field]&sortOrder=[sort_order]
[sort_field]: id, language_id, currency_code, amount or end_date
[sort_order]: ASC or DESC
Example: /api/gift_cards/get_all?sortField=id&sortOrder=ASC
Returns: A serialized list with gift cards

Get posts by a search [HttpGet]

Get a serialized list with models by search keywords.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST,API_MINIMAL_TRUST
Url: /api/gift_cards/get_by_search?keywords=[keywords]&pageSize=[page_size]&pageNumber=[page_number]&sortField=[sort_field]&sortOrder=[sort_order]
[keywords]: An url encoded string with keywords separated by space (string)
[page_size]: The number of posts on one page (Int32)
[page_number]: The page number (Int32)
[sort_field]: id, language_id, currency_code, amount or end_date
[sort_order]: ASC or DESC
Example: /api/gift_cards/get_by_search?keywords=one%20two&pageSize=10&pageNumber=2&sortField=id&sortOrder=ASC
Returns: A serialized list with gift cards

Delete a post [HttpDelete]

Delete a gift card by id.

Trust: API_FULL_TRUST
Url: /api/gift_cards/delete/[id]
[id]: The id of a gift card (string)
Example: /api/gift_cards/delete/SSSMMWW
Returns: A HttpResponseMessage with a status code and a message

Comments
Username
Password