1GLOBAL API (v1)
Download OpenAPI specification:Download
A set of HTTP REST endpoints that facilitates integration with 1GLOBAL's global connectivity platform
Retrieves information that relates to the customer’s legal entity. Data at this level rarely changes throughout the lifecycle of the customer. There is normally a one to one relationship between the countries account and the primary countries MSISDNs (mobile number). Each account will be invoiced on an monthly basis and is the highest linkage to the account level products and persons.
Retrieves all accounts
Retrieves all accounts
Authorizations:
query Parameters
limit | integer <int32> [ 1 .. 100 ] Default: 10 Number of items to retrieve per page, maximum 50 |
cursor | string (Cursor) [ 1 .. 128 ] characters ^[0-9a-zA-Z\-\.\_\~]{1,128}$ Specifies a cursor to get the next page of results |
Responses
Response samples
- 200
- 400
- 401
- 500
- 503
- 504
- default
{- "_links": {
- "next": {
- "method": "GET"
}
}, - "_embedded": {
- "accounts": [
- {
- "_links": {
- "self": {
- "method": "GET"
}, - "persons": {
- "method": "GET"
}, - "products": {
- "method": "GET"
}
}, - "id": "783e6239-f2a2-4a73-86b6-922176563ae2",
- "account_number": 20023231,
- "uri": "tri:::::account:783e6239-f2a2-4a73-86b6-922176563ae2",
- "name": "Test 1",
- "status": "active",
- "country_alpha2": "HK",
- "created_stamp": "2020-02-09T20:35:22Z"
}, - {
- "_links": {
- "self": {
- "method": "GET"
}, - "persons": {
- "method": "GET"
}, - "products": {
- "method": "GET"
}
}, - "id": "61a61d41-6a22-4fd7-8d6b-fb98119782a0",
- "account_number": 20023232,
- "uri": "tri:::::account:61a61d41-6a22-4fd7-8d6b-fb98119782a0",
- "name": "Test 2",
- "status": "terminated",
- "country_alpha2": "NL",
- "created_stamp": "2020-09-01T08:56:24Z"
}
]
}
}
Retrieves an account by its id
Retrieves an account by its id
Authorizations:
path Parameters
id required | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: 1b648e62-daaa-49ca-8842-7f36f848ceea The resource identifier |
Responses
Response samples
- 200
- 401
- 404
- 500
- 503
- 504
- default
{- "_links": {
- "self": {
- "method": "GET"
}, - "persons": {
- "method": "GET"
}, - "products": {
- "method": "GET"
}
}, - "id": "783e6239-f2a2-4a73-86b6-922176563ae2",
- "account_number": 20023231,
- "uri": "tri:::::account:783e6239-f2a2-4a73-86b6-922176563ae2",
- "name": "Test 1",
- "status": "active",
- "country_alpha2": "HK",
- "created_stamp": "2020-02-09T20:35:22Z"
}
Retrieves details of the 1GLOBAL products that are either active (Current) or are deactivated against the person. Each person will be active against a core plan that holds the bundles associated to the plan along with the MSISDN (mobile number) and ICCID (SIM number) details. Products can be held at account level as well as persons level. Add-on products can also be linked to a person or shared at account level. Products that are shared will not be linked to an individual person as they are shared.
Retrieves all products
Retrieves all products
Authorizations:
query Parameters
account-id | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: account-id=1b648e62-daaa-49ca-8842-7f36f848ceea An account's identifier |
status | any (ProductStatus) Enum: "active" "terminated" The product status |
limit | integer <int32> [ 1 .. 100 ] Default: 10 Number of items to retrieve per page, maximum 50 |
cursor | string (Cursor) [ 1 .. 128 ] characters ^[0-9a-zA-Z\-\.\_\~]{1,128}$ Specifies a cursor to get the next page of results |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
- 503
- 504
- default
{- "_links": {
- "next": {
- "method": "GET"
}
}, - "_embedded": {
- "products": [
- {
- "_links": {
- "self": {
- "method": "GET"
}, - "account": {
- "method": "GET"
}
}, - "id": "7604fdeb-8093-40b4-b8fb-4beda8233ce9",
- "uri": "tri:::::product:7604fdeb-8093-40b4-b8fb-4beda8233ce9",
- "status": "active",
- "start_stamp": "2014-01-16T00:00:00Z",
- "_embedded": {
- "offering": {
- "code": "S04DONARP3R0",
- "name": "Domestic On-Net - Account Level",
- "categories": { }
}
}
}, - {
- "_links": {
- "self": {
- "method": "GET"
}, - "account": {
- "method": "GET"
}, - "person": {
- "method": "GET"
}
}, - "id": "1d4bd61d-d1f3-4929-b3ca-67b91109eaca",
- "uri": "tri:::::product:1d4bd61d-d1f3-4929-b3ca-67b91109eaca",
- "status": "active",
- "start_stamp": "2020-03-04T14:39:47Z",
- "_embedded": {
- "offering": {
- "code": "HKLTJPPCP09A11SRP3",
- "name": "Japan - Secondary Number",
- "categories": { }
}, - "msisdn": {
- "msisdn": "+81345203333",
- "is_primary": false
}, - "person": {
- "_links": {
- "self": {
- "method": "GET"
}
}, - "first_name": "first name",
- "last_name": "first name",
- "email": "email@gmail.com",
- "employee_id": "1d4bd61d"
}
}
}, - {
- "_links": {
- "self": {
- "method": "GET"
}, - "account": {
- "method": "GET"
}, - "person": {
- "method": "GET"
}
}, - "id": "4c7c25bf-0030-414d-b2ba-b0cd3dbbafe7",
- "uri": "tri:::::product:4c7c25bf-0030-414d-b2ba-b0cd3dbbafe7",
- "status": "active",
- "start_stamp": "2020-03-04T00:00:00Z",
- "_embedded": {
- "offering": {
- "code": "HKLTJPPCP09S1RP3R0",
- "name": "Standard/Micro Business SIM",
- "categories": {
- "tmr_record_type": [
- "voice",
- "voice_only"
]
}
}, - "iccid": {
- "iccid": "8944473540001433333"
}
}
}
]
}
}
Retrieves a product by its id
Retrieves a product by its id
Authorizations:
path Parameters
id required | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: 1b648e62-daaa-49ca-8842-7f36f848ceea The resource identifier |
Responses
Response samples
- 200
- 401
- 404
- 500
- 503
- 504
- default
{- "_links": {
- "self": {
- "method": "GET"
}, - "account": {
- "method": "GET"
}
}, - "id": "7604fdeb-8093-40b4-b8fb-4beda8233ce9",
- "uri": "tri:::::product:7604fdeb-8093-40b4-b8fb-4beda8233ce9",
- "status": "active",
- "start_stamp": "2014-01-16T00:00:00Z",
- "_embedded": {
- "offering": {
- "code": "S04DONARP3R0",
- "name": "Domestic On-Net - Account Level",
- "categories": {
- "tmr_record_type": [
- "voice",
- "sms",
- "voice+sms"
]
}
}, - "person": {
- "_links": {
}, - "first_name": "fist name",
- "last_name": "last name",
- "email": "email@gmail.com",
- "employee_id": "7604fdeb"
}
}
}
Information retrieved in the Persons API provides details relating to the individual user. This will include first name, last name and any other information held by 1GLOBAL relevant to the user such as email address. This also shows the active MSISDNs (mobile number) and its related active products associated to the person. Please note this will not show products that are shared at account level.
Retrieves all persons
Retrieves all persons
Authorizations:
query Parameters
string (Email) [ 6 .. 128 ] characters ^.+\@.+\..+$ Example: email=someone@truphone.com The person’s email address | |
account-id | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: account-id=1b648e62-daaa-49ca-8842-7f36f848ceea An account's identifier |
limit | integer <int32> [ 1 .. 100 ] Default: 10 Number of items to retrieve per page, maximum 50 |
cursor | string (Cursor) [ 1 .. 128 ] characters ^[0-9a-zA-Z\-\.\_\~]{1,128}$ Specifies a cursor to get the next page of results |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
- 503
- 504
- default
{- "_links": {
- "next": {
- "method": "GET"
}
}, - "_embedded": {
- "persons": [
- {
- "_links": {
- "self": {
- "method": "GET"
}, - "account": {
- "method": "GET"
}
}, - "id": "3d0396a9-fd5f-41be-a27d-6a1afde621a6",
- "uri": "tri:::::person:3d0396a9-fd5f-41be-a27d-6a1afde621a6",
- "first_name": "Genghis",
- "last_name": "Khan",
- "email": "genghis.khan@gmail.com",
- "cost_centre": "300",
- "employee_id": "F301"
}, - {
- "_links": {
- "self": {
- "method": "GET"
}, - "account": {
- "method": "GET"
}
}, - "id": "f0bc3abc-353f-4f08-8ea5-8a9c5c42062a",
- "uri": "tri:::::person:f0bc3abc-353f-4f08-8ea5-8a9c5c42062a",
- "first_name": "Napoleon",
- "last_name": "Bonaparte",
- "email": "napoleon.bonaparte@gmail.com",
- "cost_centre": "300",
- "employee_id": "F302",
- "_embedded": {
- "msisdns": [
- {
- "msisdn": "+85251222222",
- "_embedded": {
- "products": [
- {
- "id": "be38631d-d80a-4257-8fc1-b8832894218c",
- "uri": "tri:::::product:be38631d-d80a-4257-8fc1-b8832894218c",
- "_links": {
- "product": {
- "method": "GET"
}
}
}
]
}
}
]
}
}
]
}
}
Retrieves a person by its id
Retrieves a person by its id
Authorizations:
path Parameters
id required | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: 1b648e62-daaa-49ca-8842-7f36f848ceea The resource identifier |
Responses
Response samples
- 200
- 401
- 404
- 500
- 503
- 504
- default
{- "_links": {
- "self": {
- "method": "GET"
}, - "account": {
- "method": "GET"
}
}, - "id": "f0bc3abc-353f-4f08-8ea5-8a9c5c42062a",
- "uri": "tri:::::person:f0bc3abc-353f-4f08-8ea5-8a9c5c42062a",
- "first_name": "Napoleon",
- "last_name": "Bonaparte",
- "email": "napoleon.bonaparte@gmail.com",
- "cost_centre": "300",
- "employee_id": "F302",
- "_embedded": {
- "msisdns": [
- {
- "msisdn": "+85251222222",
- "_embedded": {
- "products": [
- {
- "id": "be38631d-d80a-4257-8fc1-b8832894218c",
- "uri": "tri:::::product:be38631d-d80a-4257-8fc1-b8832894218c",
- "_links": {
- "product": {
- "method": "GET"
}
}
}
]
}
}
]
}
}
Billing Usage API retrieves near real time usage summary by type of event (voice, SMS, data) or itemised usage. Search work on all MSISDNs (mobile number) assigned to the user (e.g. Primary and secondary numbers) and the results will be returned at the user level and not at MSISDN level. i.e. when searching using someone's primary or any additional number, the results returned will be the same and will show results for calls that were made from or received by any of the numbers assigned to the person.
Retrieves itemised billing usage for the account s
Retrieves itemised billing usage for the account sorted in descending order by start stamp, with the most recently usage appearing first
Authorizations:
query Parameters
account-id required | string An account's identifier |
from-date | string <date> (Iso8601Date) ^([0-9]{4})-(?:[0-9]{2})-([0-9]{2})$ Usage date begin filter. The begin date is inclusive |
to-date | string <date> (Iso8601Date) ^([0-9]{4})-(?:[0-9]{2})-([0-9]{2})$ Usage date end filter. The begin date is exclusive |
object Usage person filter | |
object Usage product filter | |
type | Array of strings Items Enum: "voice" "data" "sms" Usage type filter |
cost-type | Array of strings (CostType) Items Enum: "free" "in_bundle" "out_of_bundle" Usage cost type filter |
direction | string Enum: "inbound" "outbound" Usage direction filter |
number | string Usage from or to number filter |
cursor | string (Cursor) [ 1 .. 128 ] characters ^[0-9a-zA-Z\-\.\_\~]{1,128}$ Specifies a cursor to get the next page of results |
limit | integer <int32> (Limit) [ 1 .. 100 ] Default: 10 The maximum number of items to retrieve, per page |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 406
- 415
- 422
- 429
- 500
- 502
- 503
- 504
- default
{- "from_date": "2021-11-10",
- "to_date": "2021-12-10",
- "uri": "tri:billing:cost::12345678:usage/items:",
- "_links": {
- "self": {
- "href": "/billing/cost/Usage/items?account-id=2f5d3a2b-2e16-47d3-b3f9-20775ca1ffec&from-date=2021-11-10&to-date=2021-12-10&limit=2",
- "method": "GET"
}, - "next": {
- "href": "/billing/cost/Usage/items?account-id=2f5d3a2b-2e16-47d3-b3f9-20775ca1ffec&from-date=2021-11-10&to-date=2021-12-10&limit=2&cursor=MTYzOTA5MDEyOS8wMDIyOUQyODI1NUFBRTAw",
- "method": "GET"
}
}, - "_embedded": {
- "usage_items": [
- {
- "id": "00229D2E36AF6600",
- "uri": "tri:billing:cost::12345678:usage/items:00229D2E36AF6600",
- "created_stamp": "2021-12-09T23:07:22Z",
- "start_stamp": "2021-12-09T23:07:22Z",
- "from_number": "447408847485",
- "to_number": "447408896600",
- "from_country_alpha2": "GB",
- "to_country_alpha2": "GB",
- "type": "voice",
- "unit": "seconds",
- "quantity": 45,
- "charged_quantity": 60,
- "direction": "outbound",
- "cost": 0,
- "cost_type": "free",
- "currency_code": "GBP",
- "_embedded": {
- "product": {
- "code": "ITC20102",
- "type": "plan",
- "name": "Truphone 500 Plan - UK"
}, - "person": {
- "id": "3d3e3259-58e4-15bd-b1b4-1c397bf1a5d1",
- "name": "Person 1",
- "group": "Person Group"
}, - "billing_period": {
- "id": "00120211210",
- "start_date": "2021-11-10",
- "end_date": "2021-12-09"
}
}
}, - {
- "id": "00229D28255AAE00",
- "uri": "tri:billing:cost::12345678:usage/items:00229D28255AAE00",
- "created_stamp": "2021-12-09T22:48:49Z",
- "start_stamp": "2021-12-09T22:48:49Z",
- "from_number": "447408854297",
- "to_number": "447408896600",
- "from_country_alpha2": "GB",
- "to_country_alpha2": "GB",
- "type": "voice",
- "unit": "seconds",
- "quantity": 25,
- "charged_quantity": 60,
- "direction": "outbound",
- "cost": 0,
- "cost_type": "free",
- "currency_code": "GBP",
- "_embedded": {
- "product": {
- "code": "ITC20102",
- "type": "plan",
- "name": "Truphone 500 Plan - UK"
}, - "person": {
- "id": "06b00632-bee8-1487-199a-0d3b916bc8e1",
- "name": "Person 2",
- "group": "Person Group"
}, - "billing_period": {
- "id": "00120211210",
- "start_date": "2021-11-10",
- "end_date": "2021-12-09"
}
}
}
]
}
}
Get all call recordings
Returns all call recordings
Authorizations:
query Parameters
account-id | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: account-id=1b648e62-daaa-49ca-8842-7f36f848ceea account identifier |
subscriber-id | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: subscriber-id=1b648e62-daaa-49ca-8842-7f36f848ceea Subscriber identifier |
start-created-stamp | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: start-created-stamp=1b648e62-daaa-49ca-8842-7f36f848ceea Sync timestamp start |
end-created-stamp | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: end-created-stamp=1b648e62-daaa-49ca-8842-7f36f848ceea Sync timestamp end |
established | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: established=1b648e62-daaa-49ca-8842-7f36f848ceea Connection established |
cursor | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: cursor=1b648e62-daaa-49ca-8842-7f36f848ceea A string containing an UUID as specified in IETF's RFC 4122 |
page-size | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: page-size=1b648e62-daaa-49ca-8842-7f36f848ceea A string containing an UUID as specified in IETF's RFC 4122 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 406
- 415
- 429
- 500
- 502
- 503
- 504
- default
{- "_embedded": {
- "data": [
- {
- "id": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "created_stamp": "2021-02-01T14:28:17.967Z",
- "call_id": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "call_random_seed": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "status": "orig_closed",
- "established": true,
- "direction": "inbound",
- "account": {
- "id": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "name": "A Name",
- "customer_id": "1b648e62-daaa-49ca-8842-7f36f848ceea"
}, - "caller_number": "+441112323421",
- "callee_number": "+441112323421",
- "diversion_number": "+441112323421",
- "recording": {
- "recorders": [
- {
- "sip_destination_ip": "127.0.0.1",
- "type": "primary"
}
], - "number": "+441112323421"
}, - "subscriber": {
- "id": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "first_name": "A Name",
- "last_name": "A Name",
- "email": "someone@truphone.com",
- "primary_number": "+441112323421"
},
}
]
}, - "_links": {
}
}
Find call recording by ID
Returns a single call recording
Authorizations:
path Parameters
id required | string (UUID) = 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]... Example: 7de05476-06ad-4647-8270-52bcef9396d3 ID of call recording |
Responses
Response samples
- 200
- 404
- 500
- 502
- 503
- 504
- default
{- "id": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "created_stamp": "2021-02-01T14:28:17.967Z",
- "call_id": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "call_random_seed": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "status": "orig_closed",
- "established": true,
- "direction": "inbound",
- "account": {
- "id": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "name": "A Name",
- "customer_id": "1b648e62-daaa-49ca-8842-7f36f848ceea"
}, - "caller_number": "+441112323421",
- "callee_number": "+441112323421",
- "diversion_number": "+441112323421",
- "recording": {
- "recorders": [
- {
- "sip_destination_ip": "127.0.0.1",
- "type": "primary"
}
], - "number": "+441112323421"
}, - "subscriber": {
- "id": "1b648e62-daaa-49ca-8842-7f36f848ceea",
- "first_name": "A Name",
- "last_name": "A Name",
- "email": "someone@truphone.com",
- "primary_number": "+441112323421"
},
}