# Register / Update Merchant endpoint info.

Register and update the Merchant endpoint GET /v1/merchant information in  Keeta. 
For the Software Service, all authorized merchant will use the same token. 
To enable Keeta to identify which merchant needs to be registered,
the Software Service  must include the Keeta merchant ID in its requests.
The Software Service should also save the mapping relationship between the Keeta merchant ID and its own merchant ID in the system.
Merchants can obtain this merchantId from the Keeta merchant portal.
> IMPORTANT: 
> 1. It is necessary to provide the Keeta merchant ID to ensure that the mapping between the merchant ID of Software Service and the merchantId of Keeta is accurate.
> 2. If an existing Keeta MerchantId or External MerchantId under the App has been previously registered, any subsequent onboarding request containing these identifiers will result in the deletion of historical data and the creation of a new mapping configuration.
> 3. Store registration via onboarding endpoint must be completed prior to order flow integration. This enables Keeta to properly identify the merchantId in your system. Otherwise, no order events will be received via polling or webhook.

HOST: Keeta

DIRECTION:

Endpoint: PUT /v1/merchantOnboarding
Version: v.1.0.7
Security: OAuth2, Sig

## Query parameters:

  - `merchantId` (string, required)
    The ID of the Merchant for whom you want to complete or change registration info.

## Request fields (application/json):

  - `getMerchantURL` (object)
    Information about the merchant's Software Service's [GET /v1/merchant](#operation/getMerchant) access. This endpoint has the necessary information for Keeta to be able to make the merchant's available on their plataform.

  - `getMerchantURL.baseURL` (string, required)
    The URL for accessing the endpoint.

  - `getMerchantURL.apiKey` (string)
    The API_KEY for accessing the endpoint (see [AUTHENTICATION](#tag/authentication) section form more information).

  - `ordersWebhookURL` (string)
    Information about the merchant's Software Service's [POST /v1/newEvent](#operation/newEvent) webhook access. This is where Keeta will sent the order's events to the Software Service as they happen.

  - `keetaMerchantId` (number, required)
    The Keeta merchant ID is generated by Keeta. Merchants can obtain this merchantId from the Keeta merchant portal.

## Response 201 fields (application/json):

  - `getMerchantURL` (object)
    Information about the merchant's Software Service's [GET /v1/merchant](#operation/getMerchant) access. This endpoint has the necessary information for Keeta to be able to make the merchant's available on their plataform.

  - `getMerchantURL.baseURL` (string, required)
    The URL for accessing the endpoint.

  - `getMerchantURL.apiKey` (string)
    The API_KEY for accessing the endpoint (see [AUTHENTICATION](#tag/authentication) section form more information).

  - `ordersWebhookURL` (string)
    Information about the merchant's Software Service's [POST /v1/newEvent](#operation/newEvent) webhook access. This is where Keeta will sent the order's events to the Software Service as they happen.

  - `keetaMerchantId` (number, required)
    The Keeta merchant ID is generated by Keeta. Merchants can obtain this merchantId from the Keeta merchant portal.

## Response 400 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: "Unexpected error"

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 401 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: "Unexpected error"

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 403 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: "Unexpected error"

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 404 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: "Unexpected error"

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500

## Response 503 fields (application/problem+json):

  - `title` (string, required)
    Short description of the problem.
    Example: "Unexpected error"

  - `status` (integer, required)
    HTTP code of the returned status.
    Example: 500


