# Sale API

## Register

<mark style="color:green;">`POST`</mark> `https://{baseurl}/sales/sale/api/register`

This endpoint allows you to create sales request.

#### Query Parameters

| Name                    | Type   | Description                         |
| ----------------------- | ------ | ----------------------------------- |
| country                 | string | Country Code                        |
| partner\_code           | string | Partner Code                        |
| plan\_code              | string | Plan Code                           |
| partner\_reference      | string | Partner Reference Number            |
| name                    | string | Customer Name                       |
| mobile                  | string | Customer Mobile                     |
| id\_type                | string | Customer Id Type                    |
| id\_number              | string | Customer Id Number                  |
| email                   | string | Customer Email                      |
| dob                     | string | Customer Date of Birth (YYYY-MM-DD) |
| sale\_date              | string | Sale Date (YYYY-MM-DD)              |
| beneficiaryName         | string | Beneficiary Name                    |
| beneficiaryRelationship | string | Beneficiary Relationship            |
| beneficiaryIdType       | string | Beneficiary National Id Type        |
| beneficiaryidNumber     | string | Beneficiary Id Number               |
| beneficiaryFatherName   | string | Beneficiary Father Name             |
| notes                   | array  | Other Useful Information            |

#### Headers

| Name                   | Type   | Description                          |
| ---------------------- | ------ | ------------------------------------ |
| EIGER-SESSION-ID       | string | Webservice Token API Generated Value |
| EIGER-TOKEN            | string | Webservice Token API Generated Value |
| EIGER-API-REQUEST-TYPE | string | REST                                 |
| Accept                 | string | application/json                     |
| Content-Type           | string | application/json                     |

{% tabs %}
{% tab title="200 Sale successfully registered." %}

```
{
"status": "SUCCESS",
"errorcode": "0000",
"data": {
"apiType": "Create Sale API",
"sale_number": "SC.XXXX.20.0000000062.00",
"certificate_start_date": "2020-01-25",
"certificate_end_date": "2030-11-08"
},
"message": "Sales registered successfully",
"errors": null
}
```

{% endtab %}

{% tab title="404 Failed to register sale." %}

```
{    "message": "Failed"}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.stonestepag.com/sale-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
