# Create article supplier

This workflow allows third parties to add or update supplier information related to articles in Ultimo. Records will be created in the entity ArticleVendor.&#x20;

The following parameters are used in the request.

| ArticleId                       | The Id of the article. This parameter is required.                                                                       |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| VendorId                        | The Id of the entity Vendor. This parameter is required.                                                                 |
| ArticleUnitPrice                | Purchase price. Default value is 0. This parameter is optional.                                                          |
| DataProvider                    | The data provider of the record. E.g. the name of a ERP system. This parameter is optional.                              |
| Discount                        | Discount of the article. Default value is 0. This parameter is optional.                                                 |
| ExternalId                      | The external identification of the articlevendor record. This parameter is required.                                     |
| LeadTime                        | Delivery time in days based on supplier calendar. Default value is 0. This parameter is optional.                        |
| MinimumPurchaseQuantity         | Minimum ordered quantity. Default value is 1. This parameter is optional.                                                |
| Preference                      | Set vendor as preferred supplier. Allowed values: True or False. This parameter is optional. The default value is False. |
| PurchaseQuantityCeilSignificant | Order quantity per unit. Default value is 1. This parameter is optional.                                                 |
| QuantityPurchaseUnit            | Ordered quantity sliding scale. Default value is 0. This parameter is optional.                                          |
| UnitDescription                 | Description of the Unit. This parameter is optional.                                                                     |
| PurchaseCode                    | Article order number for the supplier. This parameter is optional.                                                       |

## Technical details

### Basic URL (POST):

`https://customer.ultimo.com/api/V1/Action/REST_ArticleVendor_Import`

Header data:

| Parameter            | Description                                               |
| -------------------- | --------------------------------------------------------- |
| ApiKey               | Request an API key at (application manager or consultant) |
| ApplicationElementId | Fixed value “09655272-a56b-457b-ae3d-3fbaf1ebd9c5”        |

### Body (example):

```csharp
{
   "ArticleId":"0001",
   "VendorId":"2011",
   "ArticleUnitPrice":8.00000,
   "DataProvider":"ERP",
   "Discount":5.00,
   "ExternalId":null,
   "LeadTime":14,
   "MinimumPurchaseQuantity":1.00,
   "Preference":false,
   "PurchaseQuantityCeilSignificant":10.00,
   "QuantityPurchaseUnit":1.00,
   "UnitDescription":"Box",
   "PurchaseCode":"8001",
}
```

### Normal response:

{% hint style="success" %}
Status: 200 OK
{% endhint %}

```csharp
{
    "properties": {}
}
```

### Response when the action is not allowed:

{% hint style="danger" %}
Status: 400 Bad Request
{% endhint %}

```csharp
{
    "message": "Item supplier cannot be created or updated.\r\nCause: Article and/or vendor is not provided.",
    "type": 3,
    "code": "3399"
}
```

### Response when the API-key is invalid:

{% hint style="danger" %}
Status: 401 Unauthorized
{% endhint %}

```csharp
{
    "message": "Missing API key",
    "code": "MissingApikey"
}
```
