Skip to main content
POST
/
v1
/
admin
/
orders
/
{id}
/
retry-allocation
Retry allocation for unallocated order items
curl --request POST \
  --url http://localhost:3000/v1/admin/orders/{id}/retry-allocation \
  --header 'Content-Type: application/json' \
  --data '
{
  "order_item_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
import requests

url = "http://localhost:3000/v1/admin/orders/{id}/retry-allocation"

payload = { "order_item_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({order_item_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};

fetch('http://localhost:3000/v1/admin/orders/{id}/retry-allocation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/admin/orders/{id}/retry-allocation",
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([
'order_item_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3000/v1/admin/orders/{id}/retry-allocation"

payload := strings.NewReader("{\n \"order_item_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

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))

}
HttpResponse<String> response = Unirest.post("http://localhost:3000/v1/admin/orders/{id}/retry-allocation")
.header("Content-Type", "application/json")
.body("{\n \"order_item_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:3000/v1/admin/orders/{id}/retry-allocation")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_item_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "retried_items": 123,
  "allocation": {
    "rfc_items": 123,
    "sweep_items": 123,
    "pick_lists_created": 123,
    "sweeps_used": [
      "<string>"
    ]
  },
  "attempts": [
    {
      "order_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "fulfillment_source": "<string>",
      "sweep_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "error_message": "<string>"
    }
  ],
  "errors": [
    "<string>"
  ]
}

Path Parameters

id
string<uuid>
required

Body

application/json
order_item_ids
string<uuid>[]

Specific item IDs to retry. Omit to retry all unallocated items.

Response

200 - application/json

Retry allocation results

success
boolean
required
retried_items
number
required
allocation
object
required
attempts
object[]
required
errors
string[]