# Create a promotion use

Source: https://developers.swell.is/backend-api/promotion-uses/create-a-promotion-use

Create a new promotion use.

## Arguments

- `parent_id` (objectId, required): Unique identifier of the parent promotion.
- `id` (objectId): ID of the promotion use.
- `order_id` (objectId): Unique identifier for the order that the promotion use is applied to.
- `subscription_id` (objectId): ID of the subscription plan.
- `account_id` (objectId): ID of the account connected to the promotion use.
- `date_created` (date): Date and time the promotion use was created.
- `date_updated` (date): Date and time the promotion use was last updated.
- `order` (Order)
- `parent` (Promotion)
- `subscription` (Subscription)

## Example request

`POST /promotions:uses`

**cURL**

```sh
$ curl https://api.swell.store/promotions:uses \
  -u store-id:secret-key \
  -d order_id="62bf11bb4b738e00141c51d6" \
```

**Node**

```javascript
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');

await swell.post('/promotions:uses', {
  order_id: '62bf11bb4b738e00141c51d6'
});
```

**PHP**

```php
<?php $swell = new \Swell\Client('store-id', 'secret-key');

$swell->post('/promotions:uses', [
  'order_id' => '62bf11bb4b738e00141c51d6'
]);
```

## Example response

```json
{
  "parent_id": "6285746dd0fc72001a6a2f4e",
  "account_id": "628fb3c90f42a10014f04787",
  "order_id": "62a09d0317f83f001975b491",
  "date_created": "2022-06-08T13:08:10.445Z",
  "id": "62a09f3a17f83f001975b4d1"
},
```
