Look up an order for redemption
Looks up an order and returns the redemption URLs associated with its items and models. This public endpoint is rate limited to 20 requests per minute per IP address.
curl -X POST "http://localhost:8080/api/redemption" \
-H "Content-Type: application/json" \
-d '{
"order_id": "example_string"
}'
import requests
import json
url = "http://localhost:8080/api/redemption"
headers = {
"Content-Type": "application/json"
}
data = {
"order_id": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("http://localhost:8080/api/redemption", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"order_id": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"order_id": "example_string"
}`)
req, err := http.NewRequest("POST", "http://localhost:8080/api/redemption", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('http://localhost:8080/api/redemption')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
"order_id": "example_string"
}'
response = http.request(request)
puts response.body
{
"response": [
{
"shopee_item_id": 123,
"item_name": "John Doe",
"shopee_model_id": 123,
"model_name": "John Doe",
"quantity": 42,
"redeem_url": "example_string"
}
],
"warnings": [
{
"type": "example_string",
"message": "example_string"
}
]
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
POST
/api/redemption
POST
Base URLstring
Target server for requests. Edit to use your own host.
Content-Typestring
RequiredThe media type of the request body
Options: application/json
order_idstring
RequiredShopee order identifier.
Request Preview
Response
Response will appear here after sending the request
Body
application/json
order_idstring
RequiredShopee order identifier.
Responses
responsearray
RequiredRedemption entries found for the order.
warningsarray
RequiredNon-fatal warnings generated during lookup.
Was this page helpful?