Swish Developer Docs
Go to websiteInstall now
  • Swish API
    • Overview
    • Authentication
    • Rate limits
    • Pagination
    • Errors
    • API Reference
      • Items
      • Lists
      • Profiles
  • Libraries
    • API Client
    • Browser
    • Node.js
    • React
Powered by GitBook
On this page
  1. Swish API
  2. API Reference

Items

An Item in Swish belongs to a List and references a Shopify product/variant.

PreviousAPI ReferenceNextLists

Last updated 2 months ago

delete
Authorizations
Path parameters
itemIdstringRequired

The ID of the item

Example: 67a61d5561e4f9de302c02a1
Responses
204
The item has been successfully deleted.
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
delete
DELETE /api/2025-04/items/{itemId} HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Accept: */*

No content

get
Authorizations
Path parameters
itemIdstringRequired

The ID of the item

Example: 67a61d5561e4f9de302c02a1
Responses
200
The item has been successfully found.
application/json
Responseall of
objectOptional
and
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
get
GET /api/2025-04/items/{itemId} HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Accept: */*
{
  "data": {
    "id": "67a61d5561e4f9de302c02a1",
    "productId": 123,
    "variantId": 456,
    "quantity": 1,
    "createdAt": "2025-01-01T10:00:00.000Z",
    "updatedAt": "2025-01-01T10:00:00.000Z",
    "listIds": [
      "text"
    ]
  }
}
  • GET/items
  • POST/items
  • DELETE/items
  • PATCH/items/{itemId}
  • DELETE/items/{itemId}
  • GET/items/{itemId}
  • PUT/items/{itemId}/lists
get
Authorizations
Query parameters
pagestringOptional

The page cursor

limitnumberOptional

Number of lists/items to return

Default: 50
querystringOptional

Item search query

Example: product:123,456
Responses
200
Returns all items as paginated response
application/json
Responseall of
and
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
get
GET /api/2025-04/items HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Accept: */*
{
  "pageInfo": {
    "next": "YWZ0ZXI6NjdhNjFkNTU2MWU0ZjlkZTMwMmMwMmEx",
    "previous": "YmVmb3JlOjY3YTYxZDU1NjFlNGY5ZGUzMDJjMDJhMQ=="
  },
  "data": [
    {
      "id": "67a61d5561e4f9de302c02a1",
      "productId": 123,
      "variantId": 456,
      "quantity": 1,
      "createdAt": "2025-01-01T10:00:00.000Z",
      "updatedAt": "2025-01-01T10:00:00.000Z"
    }
  ]
}
post
Authorizations
Body
productIdnumberRequired

The Shopify ID of the product

Example: 123
variantIdnumberOptional

The Shopify ID of the variant

Example: 456
quantitynumberOptional

The quantity of the item

Default: 1Example: 1
Responses
201
The item has been successfully created.
application/json
Responseall of
objectOptional
and
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
post
POST /api/2025-04/items HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "productId": 123,
  "variantId": 456,
  "quantity": 1
}
{
  "data": {
    "id": "67a61d5561e4f9de302c02a1",
    "productId": 123,
    "variantId": 456,
    "quantity": 1,
    "createdAt": "2025-01-01T10:00:00.000Z",
    "updatedAt": "2025-01-01T10:00:00.000Z"
  }
}
delete
Authorizations
Body
itemIdsstring[]Required

The list of item IDs to delete

Example: ["507f1f77bcf86cd799439011","507f1f77bcf86cd799439022"]
Responses
204
The items have been successfully deleted.
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
delete
DELETE /api/2025-04/items HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 67

{
  "itemIds": [
    "507f1f77bcf86cd799439011",
    "507f1f77bcf86cd799439022"
  ]
}

No content

patch
Authorizations
Path parameters
itemIdstringRequired

The ID of the item

Example: 67a61d5561e4f9de302c02a1
Body
productIdnumberOptional

The Shopify ID of the product

Example: 123
variantIdnumberOptional

The Shopify ID of the variant

Example: 456
quantitynumberOptional

The quantity of the item

Default: 1Example: 2
Responses
200
The item has been successfully updated.
application/json
Responseall of
objectOptional
and
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
patch
PATCH /api/2025-04/items/{itemId} HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "productId": 123,
  "variantId": 456,
  "quantity": 2
}
{
  "data": {
    "id": "67a61d5561e4f9de302c02a1",
    "productId": 123,
    "variantId": 456,
    "quantity": 1,
    "createdAt": "2025-01-01T10:00:00.000Z",
    "updatedAt": "2025-01-01T10:00:00.000Z"
  }
}
put
Authorizations
Path parameters
itemIdstringRequired

The ID of the item

Example: 67a61d5561e4f9de302c02a1
Body
listIdsstring[]Required

The ID of the item to set the lists for

Example: ["67e2704d3c49af2fef03e054","67e2704d3c49af2fef03e054"]
Responses
200
The item has been successfully been added to the lists.
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
put
PUT /api/2025-04/items/{itemId}/lists HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 67

{
  "listIds": [
    "67e2704d3c49af2fef03e054",
    "67e2704d3c49af2fef03e054"
  ]
}

No content