Orders
Fulfill an order line item
Delivers content for one line item on a completed order. A dynamic-delivery webhook may acknowledge the original delivery request with { "status": "pending" } and later push the final content through this endpoint.
POST
/
dev
/
v1
/
orders
/
{id}
/
items
/
{itemId}
/
fulfill
Fulfill an order line item
curl --request POST \
--url https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"codes": [
"<string>"
],
"links": [
{
"url": "<string>",
"label": "<string>"
}
],
"files": [
{
"attachment_id": "<string>"
}
],
"notify_customer": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: '<string>',
codes: ['<string>'],
links: [{url: '<string>', label: '<string>'}],
files: [{attachment_id: '<string>'}],
notify_customer: true
})
};
fetch('https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill"
payload = {
"message": "<string>",
"codes": ["<string>"],
"links": [
{
"url": "<string>",
"label": "<string>"
}
],
"files": [{ "attachment_id": "<string>" }],
"notify_customer": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>',
'codes' => [
'<string>'
],
'links' => [
[
'url' => '<string>',
'label' => '<string>'
]
],
'files' => [
[
'attachment_id' => '<string>'
]
],
'notify_customer' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"codes\": [\n \"<string>\"\n ],\n \"links\": [\n {\n \"url\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"files\": [\n {\n \"attachment_id\": \"<string>\"\n }\n ],\n \"notify_customer\": true\n}")
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(string(body))
}{
"data": {
"line_item_id": "<string>",
"delivery_status": "DELIVERED",
"delivered_at": "<string>",
"delivered_items": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}Authorizations
Use your Shoppex API key in the Authorization header.
Body
application/jsonmultipart/form-datatext/plain
At least one content field (message, codes, links, or files) is required.
Text content to deliver to the buyer.
License keys or other redeemable codes.
HTTP or HTTPS links to deliver to the buyer.
Show child attributes
Show child attributes
Shop-owned attachment IDs to deliver to the buyer.
Show child attributes
Show child attributes
Whether to email the buyer. Defaults to true.
Response
Successful response
Show child attributes
Show child attributes
⌘I
Fulfill an order line item
curl --request POST \
--url https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"codes": [
"<string>"
],
"links": [
{
"url": "<string>",
"label": "<string>"
}
],
"files": [
{
"attachment_id": "<string>"
}
],
"notify_customer": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: '<string>',
codes: ['<string>'],
links: [{url: '<string>', label: '<string>'}],
files: [{attachment_id: '<string>'}],
notify_customer: true
})
};
fetch('https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill"
payload = {
"message": "<string>",
"codes": ["<string>"],
"links": [
{
"url": "<string>",
"label": "<string>"
}
],
"files": [{ "attachment_id": "<string>" }],
"notify_customer": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>',
'codes' => [
'<string>'
],
'links' => [
[
'url' => '<string>',
'label' => '<string>'
]
],
'files' => [
[
'attachment_id' => '<string>'
]
],
'notify_customer' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/orders/{id}/items/{itemId}/fulfill"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"codes\": [\n \"<string>\"\n ],\n \"links\": [\n {\n \"url\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"files\": [\n {\n \"attachment_id\": \"<string>\"\n }\n ],\n \"notify_customer\": true\n}")
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(string(body))
}{
"data": {
"line_item_id": "<string>",
"delivery_status": "DELIVERED",
"delivered_at": "<string>",
"delivered_items": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}