To receive a consent from customer for the delay on backorder or preorder fulfilment. - Fabric
To receive a consent from customer for the delay on backorder or preorder fulfilment.
cURL
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/backpre-order/order/backorder/consent-to-delay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"backOrderId": "1",
"action": "accept"
}
'
Python
import requests
url = "https://prod01.oms.fabric.inc/api/v2/backpre-order/order/backorder/consent-to-delay"
payload = {
"backOrderId": "1",
"action": "accept"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
JavaScript (Fetch)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({backOrderId: '1', action: 'accept'})
};
fetch('https://prod01.oms.fabric.inc/api/v2/backpre-order/order/backorder/consent-to-delay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
$curl = curl_init();
curl_setopt_array($curl, [\
CURLOPT_URL => "https://prod01.oms.fabric.inc/api/v2/backpre-order/order/backorder/consent-to-delay",\
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([\
'backOrderId' => '1',\
'action' => 'accept'\
]),\
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;
}
Go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod01.oms.fabric.inc/api/v2/backpre-order/order/backorder/consent-to-delay"
payload := strings.NewReader("{\n \"backOrderId\": \"1\",\n \"action\": \"accept\"\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))
}
Java (Unirest)
HttpResponse<String> response = Unirest.post("https://prod01.oms.fabric.inc/api/v2/backpre-order/order/backorder/consent-to-delay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"backOrderId\": \"1\",\n \"action\": \"accept\"\n}")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://prod01.oms.fabric.inc/api/v2/backpre-order/order/backorder/consent-to-delay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"backOrderId\": \"1\",\n \"action\": \"accept\"\n}"
response = http.request(request)
puts response.read_body
HTTP Status Codes
- 200
- 400
- 404
- 500
Example Response
{
"orderNumber": "order_123",
"sku": "sku_123",
"lineItemId": "0",
"type": "BACKORDER",
"orderDate": "2022-04-12T09:30:31.198Z",
"backOrderedQuantity": 5,
"locationNum": 23,
"channelId": "channel_12",
"orderStatusCode": "Created",
"id": "1",
"itemId": "123",
"cartId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
"toReleaseQuantity": 0,
"vendorId": "vendor_123",
"consentToDelay": "true",
"consentDate": "2022-07-12T09:30:31.198Z",
"lastNotificationDate": "2022-06-12T09:30:31.198Z",
"toNotify": "false",
"lineItemStatus": "CANCELLED",
"paymentStatus": "OK"
}
{
"message": "Bad Request"
}
{
"message": "Object Not Found."
}
{
"message": "Internal Server Error"
}
Authorizations
- Authorization: Bearer authentication header of the form
Bearer <token>, where<token>is your auth token.
Body
- backOrderId: (string, required) Example:
"1" - action: (string, required) Example:
"accept"
Response
200: (application/json)
- orderNumber: (string, required) Example:
"order_123" - sku: (string, required) Example:
"sku_123" - lineItemId: (string, required) Example:
"0" - type: (string, required) Example:
"BACKORDER" - orderDate: (string, required) Example:
"2022-04-12T09:30:31.198Z" - backOrderedQuantity: (integer
, required) Example: 5 - locationNum: (integer
, required) Example: 23 - channelId: (string, required) Example:
"channel_12" - orderStatusCode: (string, required) Example:
"Created" - id: (string) Example:
"1" - itemId: (string) Example:
"123" - cartId: (string) Example:
"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569" - toReleaseQuantity: (integer
) Example: 0 - vendorId: (string) Example:
"vendor_123" - consentToDelay: (string) Example:
"true" - consentDate: (string
) Example: "2022-07-12T09:30:31.198Z" - lastNotificationDate: (string
) Example: "2022-06-12T09:30:31.198Z" - toNotify: (string) Example:
"false" - lineItemStatus: (string) Example:
"CANCELLED" - paymentStatus: (string) Example:
"OK"