Journeys
  • Introduction
  • Getting access
  • Authentication
  • Terminology
  • API reference
    • Authorization
      • Authorize
    • Company
      • Retrieve company
      • Update company
    • Company lists
      • Retrieve company list
      • List company lists
      • Create company list
      • Update company list
      • Delete company list
    • Journeys
      • List journeys
      • Retrieve journey
      • Delete journey
      • Edit journey
    • Journey actions
      • List journey actions
      • Retrieve journey action
      • Delete journey action
    • Traveller journeys
      • List traveller journeys
      • Retrieve traveller journey
      • Retrieve actions
      • Start traveller journey
      • Create traveller journey
      • Delete traveller journey
    • Traveller journey actions
      • List journey traveller actions
      • Retrieve journey traveller action
    • Users
      • Invite
      • List users
      • Create user
      • Retrieve user
      • Delete user
      • Update user
  • Specification
Powered by GitBook
On this page
  1. API reference
  2. Company lists

Update company list

PreviousCreate company listNextDelete company list

Last updated 1 year ago

Request samples

{
   "name":"Issue types - updated",
   "source":"Jira",
   "options":[
      {
         "value":"10003",
         "label":"Service request new"
      },
      {
         "value":"10000",
         "label":"Epic new"
      },
      {
         "value":"10007",
         "label":"System problem new"
      }
   ]
}
import requests
response = requests.patch(
    "https://journeys-api.50skills.app/v1/company/lists/{short_id}/",
    json={
        "name": "Issue types - updated",
        "source": "Jira",
        "options": [
            {
                "value":"10003",
                "label":"Service request new"
            },
            {
                 "value":"10000",
                 "label":"Epic n ew"
            },
            {
                 "value":"10007",
                 "label":"System problem new"
            }
        ],
    }
)
print(response.json())               

Response samples

{
   "id":"AOse1MyX",
   "shortId":"AOse1MyX",
   "name":"Issue types - updated",
   "source":"Jira",
   "options":[
      {
         "shortId":"mrzWmkKj",
         "value":"10003",
         "label":"Service request new",
         "order":0
      },
      {
         "shortId":"MzKmA3K8",
         "value":"10000",
         "label":"Epic new",
         "order":1
      },
      {
         "shortId":"wMyvRayZ",
         "value":"10007",
         "label":"System problem new",
         "order":2
      }
   ],
   "numOptions":3
}

Edit company list

patch

Edit a company list

Authorizations
Path parameters
short_idstringRequired
Body
idstringRead-onlyOptional
short_idstringRead-onlyOptional
namestring ยท max: 255Optional
sourcestring | nullableOptional
num_optionsstringRead-onlyOptional
Responses
200Success
application/json
401
Unauthorized
404
Not found
{
  "id": "jkG26kGX",
  "shortId": "jkG26kGX",
  "name": "New list name",
  "source": null,
  "options": [
    {
      "shortId": "8oz34Ryp",
      "value": "1",
      "label": "New option one",
      "order": 0
    },
    {
      "shortId": "AYGpZNzo",
      "value": "2",
      "label": "New option two",
      "order": 1
    }
  ],
  "numOptions": 2
}