# API Request

To construct a REST API request, combine these components:

Component Description
The HTTP method - GET. Requests data from a resource.
- POST. Submits data to a resource to process.
- PUT. Updates a resource.
- PATCH. Partially updates a resource.
- DELETE. Deletes a resource.
The URL to the API service Live. https://api.ompay.com
Sandbox: https://api.sandbox.ompay.com
The URI to the resource The resource to query, submit data to, update, or delete.

For example, v1/merchants/<merchant_id/>.

Where <merchant_id> id the unique identifier of the business registered with OMPay
Query parameters Optional. Controls which data appears in the response. Use to filter, limit the size of, and sort the data in an API response.
HTTP request headers Includes the Authorization header with the access token.
A JSON request body Required for most GET, POST, PUT, and PATCH calls.

# HTTP Request Header

Header Description
Authorization Required to make API calls.

- On client SDK we use a bearer token in the Authorization header
Click here to see how to get a client token

- To make REST API calls, include a Basic authentication scheme in the header
Click here to see how to create a basic auth
Content-Type Required for operations with a request body.

Specifies the request format. The syntax is:

Content-Type: application/<format>

Where format is json.