Reserve stamp
POST
/api/v2.0/stores/{storeId}/members/{memberId}/stamp-cards/reserve
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.diller.app/api/v2.0/stores/your-store-id/members/m_nsr714RRBEHX/stamp-cards/reserve"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"reserved_stamps\": [ { \"stamp_card_id\": 1, \"count\": 1, \"external_product_id\": \"example\" } ], \"channel\": \"example\", \"external_transaction_id\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.diller.app/api/v2.0/stores/your-store-id/members/m_nsr714RRBEHX/stamp-cards/reserve"
payload := strings.NewReader("{ \"reserved_stamps\": [ { \"stamp_card_id\": 1, \"count\": 1, \"external_product_id\": \"example\" } ], \"channel\": \"example\", \"external_transaction_id\": \"example\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"reserved_stamps\": [ { \"stamp_card_id\": 1, \"count\": 1, \"external_product_id\": \"example\" } ], \"channel\": \"example\", \"external_transaction_id\": \"example\" }");Request request = new Request.Builder() .url("https://api.diller.app/api/v2.0/stores/your-store-id/members/m_nsr714RRBEHX/stamp-cards/reserve") .post(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://api.diller.app/api/v2.0/stores/your-store-id/members/m_nsr714RRBEHX/stamp-cards/reserve', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, data: { reserved_stamps: [{stamp_card_id: 1, count: 1, external_product_id: 'example'}], channel: 'example', external_transaction_id: 'example' }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.diller.app/api/v2.0/stores/your-store-id/members/m_nsr714RRBEHX/stamp-cards/reserve';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"reserved_stamps":[{"stamp_card_id":1,"count":1,"external_product_id":"example"}],"channel":"example","external_transaction_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.diller.app/api/v2.0/stores/your-store-id/members/m_nsr714RRBEHX/stamp-cards/reserve \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "reserved_stamps": [ { "stamp_card_id": 1, "count": 1, "external_product_id": "example" } ], "channel": "example", "external_transaction_id": "example" }'This endpoint enables users to reserve stamps for their pending orders, thereby ensuring that the stamps cannot be used for any other transactions.
Call the /cancel-reservation endpoint after completing or cancelling a transaction to release the stamp reservation and make it available for other transactions.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”storeId
required
string
The storeId
Example
your-store-idmemberId
required
string
The memberId
Example
m_nsr714RRBEHXRequest Body
Section titled “Request Body”Details of the stamp reservation request
object
reserved_stamps
Array<object>
object
stamp_card_id
integer format: int32
count
The number of stamps on this particular stamp cardId. It must be a positive value
integer format: int32
external_product_id
string
channel
string
external_transaction_id
string
Examplegenerated
{ "reserved_stamps": [ { "stamp_card_id": 1, "count": 1, "external_product_id": "example" } ], "channel": "example", "external_transaction_id": "example"}object
reserved_stamps
Array<object>
object
stamp_card_id
integer format: int32
count
The number of stamps on this particular stamp cardId. It must be a positive value
integer format: int32
external_product_id
string
channel
string
external_transaction_id
string
Examplegenerated
{ "reserved_stamps": [ { "stamp_card_id": 1, "count": 1, "external_product_id": "example" } ], "channel": "example", "external_transaction_id": "example"}object
reserved_stamps
Array<object>
object
stamp_card_id
integer format: int32
count
The number of stamps on this particular stamp cardId. It must be a positive value
integer format: int32
external_product_id
string
channel
string
external_transaction_id
string
Examplegenerated
{ "reserved_stamps": [ { "stamp_card_id": 1, "count": 1, "external_product_id": "example" } ], "channel": "example", "external_transaction_id": "example"}Responses
Section titled “Responses”No Content
Bad Request
Media typeapplication/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
errors
object
key
additional properties
Array<string>
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": { "additionalProperty": [ "example" ] }}