Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion source/includes/_promocodes.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,58 @@ Method uploads list of unique promo codes to the selected list. All non-unique p
| id | true | Promo codes list ID |
| codes | true | List of promo codes |





## Delete not sent promo codes

> Headers

```
Content-type: application/json
```

> Body example

```json
{
"shop_id": "...",
"shop_secret": "...",
"id": "...",
}
```

> Request example

```shell
curl --header "Content-Type: application/json" \
--request DELETE \
--data-binary "@data.json" \
https://<%= config[:api_endpoint] %>/promo_codes/purge
```

Method deletes promo codes from the list which were not sent to any user. It's useful to clean up time sensitive codes.


### HTTP Request

`DELETE https://<%= config[:api_endpoint] %>/promo_codes/purge`

`Content-Type: application/json`

### Query Parameters

| Parameter | Required | Description |
|--------------|-----------|---------------------|
| shop_id | true | Your API key |
| shop_secret | true | Your API secret key |
| id | true | Promo codes list ID |

### Errors

When promo codes list is empty, method returns 404 error.
When promo codes list is not found, method returns 404 error.




Expand Down