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

Lists

A List in Swish belongs to a Profile and contains Items.

PreviousItemsNextProfiles

Last updated 2 months ago

get
Authorizations
Path parameters
listIdstringRequired

The ID of the list

Example: 67a61d5561e4f9de302c02a1
Query parameters
sortstring · enumOptional

The sort order of the items in the list

Default: recently_savedPossible values:
Responses
200
The list has been successfully retrieved.
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/lists/{listId} HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Accept: */*
{
  "data": {
    "id": "67a61d5561e4f9de302c02a1",
    "name": "My List",
    "createdAt": "2025-01-01T10:00:00.000Z",
    "updatedAt": "2025-01-01T10:00:00.000Z",
    "items": [
      {
        "id": "67a61d5561e4f9de302c02a1",
        "productId": 123,
        "variantId": 456,
        "quantity": 1,
        "createdAt": "2025-01-01T10:00:00.000Z",
        "updatedAt": "2025-01-01T10:00:00.000Z"
      }
    ]
  }
}
delete
Authorizations
Path parameters
listIdstringRequired

The ID of the list

Example: 67a61d5561e4f9de302c02a1
Responses
204
The list 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/lists/{listId} HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Accept: */*

No content

  • GET/lists
  • POST/lists
  • GET/lists/{listId}
  • PATCH/lists/{listId}
  • DELETE/lists/{listId}
  • PUT/lists/{listId}/items/order
get
Authorizations
Responses
200
Returns all lists as paginated response
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/lists HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Accept: */*
{
  "data": [
    {
      "id": "67a61d5561e4f9de302c02a1",
      "name": "My List",
      "createdAt": "2025-01-01T10:00:00.000Z",
      "updatedAt": "2025-01-01T10:00:00.000Z"
    }
  ]
}
post
Authorizations
Body
namestringRequired

The name of the list

Example: My List
Responses
201
The list 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/lists HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "name": "My List"
}
{
  "data": {
    "id": "67a61d5561e4f9de302c02a1",
    "name": "My List",
    "createdAt": "2025-01-01T10:00:00.000Z",
    "updatedAt": "2025-01-01T10:00:00.000Z"
  }
}
patch
Authorizations
Path parameters
listIdstringRequired

The ID of the list

Example: 67a61d5561e4f9de302c02a1
Body
namestringRequired

The name of the list

Example: My List
Responses
200
The list 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/lists/{listId} HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "name": "My List"
}
{
  "data": {
    "id": "67a61d5561e4f9de302c02a1",
    "name": "My List",
    "createdAt": "2025-01-01T10:00:00.000Z",
    "updatedAt": "2025-01-01T10:00:00.000Z"
  }
}
put
Authorizations
Path parameters
listIdstringRequired

The ID of the list

Example: 67a61d5561e4f9de302c02a1
Body
itemIdsstring[]Required

The list of item IDs to reorder

Example: ["507f1f77bcf86cd799439011","507f1f77bcf86cd799439022"]
Responses
200
The list items have been successfully reordered.
application/json
Responseall of
objectOptional
and
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
put
PUT /api/2025-04/lists/{listId}/items/order HTTP/1.1
Host: swish.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 67

{
  "itemIds": [
    "507f1f77bcf86cd799439011",
    "507f1f77bcf86cd799439022"
  ]
}
{
  "data": {
    "id": "67a61d5561e4f9de302c02a1",
    "name": "My List",
    "createdAt": "2025-01-01T10:00:00.000Z",
    "updatedAt": "2025-01-01T10:00:00.000Z"
  }
}