For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Request featuresContact support
DocsAPI ReferenceGraphQLIntegrationsDeveloper ToolsMNO and Resellers
DocsAPI ReferenceGraphQLIntegrationsDeveloper ToolsMNO and Resellers
  • Docs
    • Event types
    • Tariff
  • API Reference
        • GETGet an organization's prepaid balance
        • POSTUpdate an organization's prepaid balance
        • DELReset an organization's prepaid balance
        • GETList balance transactions
        • GETList available transaction types
        • GETList billing periods
        • GETList billing details
        • GETList billing config
        • PATCHUpdate billing config
        • GETList an organization's custom rates
        • POSTCreate a new custom rate for an organization
        • DELDelete an organization's custom rate
        • POSTAssign an inclusive volume to an organization
        • DELDelete an organization's inclusive volume
LogoLogo
Request featuresContact support
API ReferenceBilling

Create a new custom rate for an organization

POST
https://cdn.emnify.net/api/v1/organisation/:org_id/custom_rate
POST
/api/v1/organisation/:org_id/custom_rate
$curl -X POST https://cdn.emnify.net/api/v1/organisation/1.1/custom_rate \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "tariff": {
> "id": 1
> },
> "ratezone": {
> "id": 1
> },
> "volume": 1.3,
> "rate": 1.2,
> "service": {
> "id": 38
> },
> "currency": {
> "id": 1
> },
> "start_date": "2020-03-01T00:00:00.000Z",
> "end_date": "2020-03-31T23:59:59.000Z"
>}'
1{}
Creates a custom rate for the organization. If no `start_date` and `end_date` are given, the start of the current month will be used as a `start_date` and will have no `end_date` and will therefore be active indefinitely. If a custom rate for the same organization and ratezone exists and overlaps with the validity period of the new rate, the existing custom rate will have its `end_date` set to the last day of the month before the `start_date` of the new rate.
Was this page helpful?
Previous

List an organization's custom rates

Next

Delete an organization's custom rate

Built with

Creates a custom rate for the organization.

If no start_date and end_date are given, the start of the current month will be used as a start_date and will have no end_date and will therefore be active indefinitely.

If a custom rate for the same organization and ratezone exists and overlaps with the validity period of the new rate, the existing custom rate will have its end_date set to the last day of the month before the start_date of the new rate.

Authentication

AuthorizationBearer

An auth_token should be provided to authenticate a session.

To obtain an auth_token, see the POST request to /api/v1/authenticate.

Path parameters

org_iddoubleRequired
Numerical ID of an organization

Request

This endpoint expects an object.
tariffobjectRequired
ratezoneobjectRequired
volumedoubleRequired
The volume in Megabytes
ratedoubleRequired
The rate in the given currency
serviceobjectRequired

This has to be set to 38 (service Data)

currencyobjectRequired
This has to be set to the currency of the child org
start_datestringOptionalformat: "^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\{2}$"
end_datestringOptionalformat: "^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\{2}$"

Response

Response to a POST that results in a creation, usually will return a Location header pointing to the location of the new resource

Errors

422
Unprocessable Entity Error