Skip to main content
POST
/
items
Create an item
curl --request POST \
  --url https://app.supercycle.com/api/v1/items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "shopifyVariantId": 123,
  "quantity": 99,
  "serials": [
    "<string>"
  ],
  "conditionId": 123,
  "locationShopifyId": 123,
  "pickLocation": "<string>",
  "acquisitionCostCents": 123
}
'
import requests

url = "https://app.supercycle.com/api/v1/items"

payload = {
"shopifyVariantId": 123,
"quantity": 99,
"serials": ["<string>"],
"conditionId": 123,
"locationShopifyId": 123,
"pickLocation": "<string>",
"acquisitionCostCents": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shopifyVariantId: 123,
quantity: 99,
serials: ['<string>'],
conditionId: 123,
locationShopifyId: 123,
pickLocation: '<string>',
acquisitionCostCents: 123
})
};

fetch('https://app.supercycle.com/api/v1/items', 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://app.supercycle.com/api/v1/items",
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([
'shopifyVariantId' => 123,
'quantity' => 99,
'serials' => [
'<string>'
],
'conditionId' => 123,
'locationShopifyId' => 123,
'pickLocation' => '<string>',
'acquisitionCostCents' => 123
]),
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://app.supercycle.com/api/v1/items"

payload := strings.NewReader("{\n \"shopifyVariantId\": 123,\n \"quantity\": 99,\n \"serials\": [\n \"<string>\"\n ],\n \"conditionId\": 123,\n \"locationShopifyId\": 123,\n \"pickLocation\": \"<string>\",\n \"acquisitionCostCents\": 123\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))

}
HttpResponse<String> response = Unirest.post("https://app.supercycle.com/api/v1/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shopifyVariantId\": 123,\n \"quantity\": 99,\n \"serials\": [\n \"<string>\"\n ],\n \"conditionId\": 123,\n \"locationShopifyId\": 123,\n \"pickLocation\": \"<string>\",\n \"acquisitionCostCents\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.supercycle.com/api/v1/items")

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 \"shopifyVariantId\": 123,\n \"quantity\": 99,\n \"serials\": [\n \"<string>\"\n ],\n \"conditionId\": 123,\n \"locationShopifyId\": 123,\n \"pickLocation\": \"<string>\",\n \"acquisitionCostCents\": 123\n}"

response = http.request(request)
puts response.read_body
[
  {
    "id": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "activeRentalId": 123,
    "productTitle": "<string>",
    "serial": "<string>",
    "sequentialId": 123,
    "shopifyVariantId": 123,
    "tags": [
      "<string>"
    ],
    "variantTitle": "<string>",
    "activeReturnId": 123,
    "condition": {
      "id": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "severityKey": "<string>",
      "severityTone": "<string>",
      "title": "<string>"
    },
    "conditionId": 123,
    "imageUrl": "<string>",
    "location": {
      "shopifyId": 123,
      "name": "<string>"
    },
    "pickLocation": "<string>",
    "acquisitionCostCents": 123,
    "roiCents": 123,
    "shopifyProductId": 123,
    "timelineEvents": [
      {
        "id": 123,
        "eventableId": 123,
        "eventableType": "<string>",
        "eventType": "<string>",
        "metadata": {},
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "author": "<string>"
      }
    ],
    "customFields": [
      {
        "id": 123,
        "ownerId": 123,
        "definitionId": 123,
        "key": "<string>",
        "value": "<string>",
        "valueJson": "<unknown>"
      }
    ]
  }
]
{
"errors": [
"Invalid request body"
]
}
{
"error": "Rate limit exceeded. Retry after 42 seconds."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
shopifyVariantId
integer<int64>
required
visibility
enum<string>
required
Available options:
available,
unavailable,
retired,
sold
quantity
integer<int32>

Number of items to create.

Required range: x <= 100
serials
string[]

Serials will be picked from the list and assigned to items.

conditionId
null | integer<int64>

ID of the condition to set. May be null to remove condition.

locationShopifyId
null | integer<int64>

ID of the Shopify location to associate with the item. May be null if no specific location is needed.

pickLocation
null | string

Physical location within warehouse using Zone-Aisle-Shelf-Bin format (e.g., "A1-02-B3"). May be null if no pick location is needed.

acquisitionCostCents
null | integer

Amount paid to acquire each new item, in cents. Applied to every created item when quantity > 1. May be null if not known yet.

Response

Expected response to a valid request

id
integer<int64>
required

Numeric ID of the item.

createdAt
string<date-time>
required
activeRentalId
null | integer<int64>
required
productTitle
string
required
serial
null | string
required
sequentialId
integer<int32>
required
shopifyVariantId
null | integer
required
status
enum<string>
required
Available options:
processed,
unprocessed
tags
string[]
required
variantTitle
null | string
required
visibility
enum<string>
required
Available options:
available,
unavailable,
sold,
retired
activeReturnId
null | integer<int64>
condition
null | object
conditionId
null | integer

ID of the condition. May be null if no condition is set.

imageUrl
null | string
location
null | object

Location of the item in the warehouse.

pickLocation
null | string

Physical location within warehouse using Zone-Aisle-Shelf-Bin format (e.g., "A1-02-B3"). May be null if no pick location is set.

acquisitionCostCents
null | integer

Amount paid to acquire this item, in cents. May be null if not set.

roiCents
null | integer

Computed return on investment (lifecycle revenue minus acquisition cost), in cents. Null when acquisitionCostCents is null.

shopifyProductId
null | integer
timelineEvents
object[]

Timeline events for this item

customFields
object[]

Custom fields attached to this item