Business Fields

Credentials

No credentials are documented for this endpoint.

Overview

This API endpoint retrieves a list of business fields, allowing users to sort and filter the data based on specific criteria.

Endpoint

GET /api/business-fields

Description

This endpoint provides access to a collection of business fields. It supports sorting by local name in either ascending or descending order.

Request Parameters

Headers

Query Example

GET /api/business-fields?sort_by=name_local&sort_direction=desc HTTP/1.1
Host: test11.payme.io
PayMe-Partner-Key: payme

Response Structure

Response Example

{
    "status_code": 0,
    "page": 1,
    "items_per_page": 245,
    "items_total": 245,
    "language": "he",
    "items": {
        "244": {
            "code": 10565,
            "name_intl": "Shutters",
            "name_local": "תריסים"
        }
    }
}

Error Handling

In case of an error, the response will include a non-zero status_code and may include additional fields describing the error.

Notes

Parameters

This endpoint takes no path, query or header parameters.

Request body

Content type: application/json

GET /api/business-fields?sort_by=name_local&sort_direction=desc HTTP/1.1
Host: test11.payme.io
PayMe-Partner-Key: payme

Code samples

curl

curl -X GET 'https://sandbox.payme.io/api/business-fields' \
  -H 'Content-Type: application/json' \
  --data-raw '{}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/business-fields", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});

console.log(await response.text());

Python

import requests

response = requests.get(
    "https://sandbox.payme.io/api/business-fields",
    json={},
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/business-fields');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Responses

default — Default (error)

Field Type Description
status_code integer
page integer
items_per_page integer
items_total integer
language string
items object
items.244 object
items.244.code integer
items.244.name_intl string
items.244.name_local string
{
  "status_code": 0,
  "page": 1,
  "items_per_page": 245,
  "items_total": 245,
  "language": "he",
  "items": {
    "244": {
      "code": 10565,
      "name_intl": "Shutters",
      "name_local": "תריסים"
    }
  }
}