# Custom Order Source

**Summary:** Endpoints for Custom Order Source

- Role: [Developers](https://www.subrite.no/developers)
- Source: https://www.subrite.no/developers/custom-order-source
- Updated: 2026-10-13
- Markdown index: https://www.subrite.no/developers/llms.txt

<a id="get-api-v1-custom-order-sources"></a>
## Get all custom order sources of the tenant

`GET /api/v1/custom-order-sources`

**Authentication:** Bearer token (JWT)

### Responses

#### 200

Content type: `application/json` · `array of CustomOrderSourceResponse`

| Name | Type | Description |
| --- | --- | --- |
| `[].id` (Required when parent is present) | `string` |   |
| `[].name` (Required when parent is present) | `string` |   |
| `[].tenantId` (Required when parent is present) | `number` |   |

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` |   |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

### Example request

```bash
curl https://api.subrite.no/api/v1/custom-order-sources \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
[
  {
    "id": "string",
    "name": "string",
    "tenantId": 0
  }
]
```

<a id="post-api-v1-custom-order-sources"></a>
## Create a new custom order source

`POST /api/v1/custom-order-sources`

**Authentication:** Bearer token (JWT)

### Request body

Content type: `application/json` · Required · `CreateCustomOrderSourceDto`

| Name | Type | Description |
| --- | --- | --- |
| `name` (Required) | `string` | `maxLength`: `255` |

**Example request body**

`application/json`

```json
{
  "name": "string"
}
```

### Responses

#### 201

Content type: `application/json` · `CustomOrderSourceResponse`

| Name | Type | Description |
| --- | --- | --- |
| `id` (Required) | `string` |   |
| `name` (Required) | `string` |   |
| `tenantId` (Required) | `number` |   |

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

### Example request

```bash
curl https://api.subrite.no/api/v1/custom-order-sources \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string"
}'
```

### Example response

201 · `application/json`

```json
{
  "id": "string",
  "name": "string",
  "tenantId": 0
}
```

<a id="get-api-v1-custom-order-sources-id"></a>
## Get a custom order source by id

`GET /api/v1/custom-order-sources/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `string` |   |

### Responses

#### 200

Content type: `application/json` · `CustomOrderSourceResponse`

Same fields as [Create a new custom order source (201)](https://www.subrite.no/developers/custom-order-source?md=true#post-api-v1-custom-order-sources).

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest

Same fields as [Create a new custom order source (400)](https://www.subrite.no/developers/custom-order-source?md=true#post-api-v1-custom-order-sources).

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

customOrderSourceNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"customOrderSourceNotFound"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "customOrderSourceNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/custom-order-sources/{id}' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{
  "id": "string",
  "name": "string",
  "tenantId": 0
}
```

<a id="delete-api-v1-custom-order-sources-id"></a>
## Delete a custom order source

`DELETE /api/v1/custom-order-sources/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `string` |   |

### Responses

#### 200

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest

Same fields as [Create a new custom order source (400)](https://www.subrite.no/developers/custom-order-source?md=true#post-api-v1-custom-order-sources).

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

customOrderSourceNotFound

Same fields as [Get a custom order source by id (404)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources-id).

**Example response**

`application/json`

```json
{
  "messageCode": "customOrderSourceNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 409

Content type: `application/json` · `ErrorResponse`

customOrderSourceHasOrders

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"customOrderSourceHasOrders"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "customOrderSourceHasOrders",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/custom-order-sources/{id}' \
  --request DELETE \
  --header 'Authorization: Bearer <token>'
```

<a id="patch-api-v1-custom-order-sources-id"></a>
## Update a custom order source

`PATCH /api/v1/custom-order-sources/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `string` |   |

### Request body

Content type: `application/json` · Required · `UpdateCustomOrderSourceDto`

| Name | Type | Description |
| --- | --- | --- |
| `name` (Required) | `string` | `maxLength`: `255` |

**Example request body**

`application/json`

```json
{
  "name": "string"
}
```

### Responses

#### 200

Content type: `application/json` · `CustomOrderSourceResponse`

Same fields as [Create a new custom order source (201)](https://www.subrite.no/developers/custom-order-source?md=true#post-api-v1-custom-order-sources).

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest

Same fields as [Create a new custom order source (400)](https://www.subrite.no/developers/custom-order-source?md=true#post-api-v1-custom-order-sources).

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

customOrderSourceNotFound

Same fields as [Get a custom order source by id (404)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources-id).

**Example response**

`application/json`

```json
{
  "messageCode": "customOrderSourceNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom order sources of the tenant (403)](https://www.subrite.no/developers/custom-order-source?md=true#get-api-v1-custom-order-sources).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/custom-order-sources/{id}' \
  --request PATCH \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string"
}'
```

### Example response

200 · `application/json`

```json
{
  "id": "string",
  "name": "string",
  "tenantId": 0
}
```
