Skip to content

REST API reference

Source channels

Discover API submission channels and their current contracts.

List API source channels available for business submissions

GET/source-channels/

Parameters

Name Location Type Required
search query string No
ordering query string No
page_size query integer No
cursor query string No
created_after query string No
created_before query string No
updated_after query string No
updated_before query string No

Request

curl --request GET \
  --url 'https://api.staging.levr.ai/api/external/v1/source-channels/' \
  --header 'Authorization: Bearer $LEVR_API_TOKEN'

Responses

Status Description
200 Source channels available to this portal and their contract URLs.
401 The request was not completed.
403 The request was not completed.
429 The request was not completed.
500 The request was not completed.

Get the current dynamic business submission contract

GET/source-channels/{source_channel_id}/business-contract/

Parameters

Name Location Type Required
source_channel_id path string Yes

Request

curl --request GET \
  --url 'https://api.staging.levr.ai/api/external/v1/source-channels/{source_channel_id}/business-contract/' \
  --header 'Authorization: Bearer $LEVR_API_TOKEN'

Responses

Status Description
200 The channel's current published JSON Schema and submission URL.
401 The request was not completed.
403 The request was not completed.
404 The request was not completed.
409 The request was not completed.
429 The request was not completed.
500 The request was not completed.

Upload a file requested by a successful business submission

POST/source-channels/{source_channel_id}/business-files/{upload_id}/

Use only the expiring upload URL returned by business creation.

Parameters

Name Location Type Required
source_channel_id path string Yes
upload_id path string Yes
Idempotency-Key header string Yes

Request body

Send a body that matches the published schema.

View request schema
{
  "additionalProperties": false,
  "properties": {
    "file": {
      "format": "binary",
      "type": "string"
    }
  },
  "required": [
    "file"
  ],
  "type": "object"
}

Request

curl --request POST \
  --url 'https://api.staging.levr.ai/api/external/v1/source-channels/{source_channel_id}/business-files/{upload_id}/' \
  --header 'Authorization: Bearer $LEVR_API_TOKEN' \
  --header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
  --header 'Content-Type: multipart/form-data' \
  --data '@request.json'

Responses

Status Description
201 File stored on the requested application field.
400 The request was not completed.
401 The request was not completed.
403 The request was not completed.
404 The request was not completed.
409 The request was not completed.
413 The request was not completed.
429 The request was not completed.
500 The request was not completed.

Create a business through an API source channel

POST/source-channels/{source_channel_id}/businesses/

Fetch this channel's business-contract endpoint before constructing the request body. Matching Idempotency-Key retries replay the exact committed response for at least 24 hours.

Parameters

Name Location Type Required
source_channel_id path string Yes
Idempotency-Key header string Yes

Request body

The exact schema is returned by the source channel's business-contract endpoint.

View request schema
{
  "additionalProperties": true,
  "description": "The exact schema is returned by the source channel's business-contract endpoint.",
  "type": "object"
}

Request

curl --request POST \
  --url 'https://api.staging.levr.ai/api/external/v1/source-channels/{source_channel_id}/businesses/' \
  --header 'Authorization: Bearer $LEVR_API_TOKEN' \
  --header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
  --header 'Content-Type: application/json' \
  --data '@request.json'

Responses

Status Description
201 Business and client intake application created.
400 The request was not completed.
401 The request was not completed.
403 The request was not completed.
404 The request was not completed.
409 The request was not completed.
422 The request was not completed.
429 The request was not completed.
500 The request was not completed.

Early access

Request a capability

Tell us what you need your integration to do. Add an email if you want a reply.