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

Orders-gift-cards, Web API

| Added: 8 May 2015 | Updated: 8 May 2015
| Rating: 0 | Votes: 0 | Pageviews: 925 | Comments (0)
This is the Web API reference for orders-gift-cards. You can add, update, get and delete orders-gift-cards with this API. Orders-gift-cards is used to get statistics on gift cards that has been used on an order and to get statistics on orders that a gift card has been used on.

Model - OrderGiftCard

Property
Type
Description
order_id
Int32
The id of an order.
gift_card_id
string(50)
The id of a gift card.
amount
decimal(14, 0)
The amount of the gift cards total amount that has been used on the order.

Add a post [HttpPost]

Add a order-gift-card post, order_id and gift_card_id is primary keys. Send a serialized version of the model (JSON, XML) to the url of the method.

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

Update a post [HttpPut]

Update a order-gift-card post, order_id and gift_card_id is primary keys. Send a serialized version of the model (JSON, XML) to the url of the method.

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

Get a post by id [HttpGet]

Get a serialized model of a order-gift-card by id.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST,API_MINIMAL_TRUST
Url: /api/orders_gift_cards/get_by_id/[order_id]?giftCardId=[gift_card_id]
[order_id]: The id of an order (Int32)
[gift_card_id]: The id of a gift card (string)
Example: /api/orders_gift_cards/get_by_id/1?giftCardId=FDFSDFSDF
Returns: A serialized model of a order-gift-card

Get posts by order id [HttpGet]

Get a serialized list of order-gift-cards by order id.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST,API_MINIMAL_TRUST
Url: /api/orders_gift_cards/get_by_order_id/[order_id]?sortField=[sort_field]&sortOrder=[sort_order]
[order_id]: The id of an order (Int32)
[sort_field]: order_id, gift_card_id or amount
[sort_order]: ASC or DESC
Example: /api/orders_gift_cards/get_by_order_id/5?sortField=gift_card_id&sortOrder=ASC
Returns: A serialized list with order-gift-cards

Get posts by gift card id [HttpGet]

Get a serialized list of order-gift-cards by gift card id.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST,API_MINIMAL_TRUST
Url: /api/orders_gift_cards/get_by_gift_card_id/[gift_card_id]?sortField=[sort_field]&sortOrder=[sort_order]
[gift_card_id]: The id of a gift card (string)
[sort_field]: order_id, gift_card_id or amount
[sort_order]: ASC or DESC
Example: /api/orders_gift_cards/get_by_gift_card_id/SSSEEGGG?sortField=amount&sortOrder=ASC
Returns: A serialized list with order-gift-cards

Get all posts [HttpGet]

Get a serialized list with models of all order-gift-cards.

Trust: API_FULL_TRUST,API_MEDIUM_TRUST,API_MINIMAL_TRUST
Url: /api/orders_gift_cards/get_all
Example: /api/orders_gift_cards/get_all
Returns: A serialized list with order-gift-cards

Delete a post [HttpDelete]

Delete a order-gift-card by order id and gift card id.

Trust: API_FULL_TRUST
Url: /api/orders_gift_cards/delete/[order_id]?giftCardId=[gift_card_id]
[order_id]: The id of an order (Int32)
[gift_card_id]: The id of a gift card (string)
Example: /api/orders_gift_cards/delete/1?giftCardId=2
Returns: A HttpResponseMessage with a status code and a message

Comments
Username
Password