curl --request POST \
--url https://api.nuwebgroup.com/v1/partner/companies/{companyId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-NU-RESELLER-ID: <x-nu-reseller-id>' \
--data '
{
"name": "Global Ticket Site",
"alias": "globaltickets",
"currencies": [
"GBP",
"USD"
],
"countries": [
"GB"
],
"languages": [
"en"
],
"gateways": [
"stripe"
],
"features": [],
"fees": [
{
"currency": "GBP",
"typeId": 1,
"salesPointTypeId": 1,
"bands": [
{
"rangeMin": 1,
"rangeMax": null,
"fixed": 100,
"percent": 0,
"min": null,
"max": null
}
]
}
],
"timezone": "Europe/London",
"trialExpiresAt": "2023-04-01 00:00:00"
}
'import requests
url = "https://api.nuwebgroup.com/v1/partner/companies/{companyId}"
payload = {
"name": "Global Ticket Site",
"alias": "globaltickets",
"currencies": ["GBP", "USD"],
"countries": ["GB"],
"languages": ["en"],
"gateways": ["stripe"],
"features": [],
"fees": [
{
"currency": "GBP",
"typeId": 1,
"salesPointTypeId": 1,
"bands": [
{
"rangeMin": 1,
"rangeMax": None,
"fixed": 100,
"percent": 0,
"min": None,
"max": None
}
]
}
],
"timezone": "Europe/London",
"trialExpiresAt": "2023-04-01 00:00:00"
}
headers = {
"X-NU-RESELLER-ID": "<x-nu-reseller-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-NU-RESELLER-ID': '<x-nu-reseller-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Global Ticket Site',
alias: 'globaltickets',
currencies: ['GBP', 'USD'],
countries: ['GB'],
languages: ['en'],
gateways: ['stripe'],
features: [],
fees: [
{
currency: 'GBP',
typeId: 1,
salesPointTypeId: 1,
bands: [{rangeMin: 1, rangeMax: null, fixed: 100, percent: 0, min: null, max: null}]
}
],
timezone: 'Europe/London',
trialExpiresAt: '2023-04-01 00:00:00'
})
};
fetch('https://api.nuwebgroup.com/v1/partner/companies/{companyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nuwebgroup.com/v1/partner/companies/{companyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Global Ticket Site',
'alias' => 'globaltickets',
'currencies' => [
'GBP',
'USD'
],
'countries' => [
'GB'
],
'languages' => [
'en'
],
'gateways' => [
'stripe'
],
'features' => [
],
'fees' => [
[
'currency' => 'GBP',
'typeId' => 1,
'salesPointTypeId' => 1,
'bands' => [
[
'rangeMin' => 1,
'rangeMax' => null,
'fixed' => 100,
'percent' => 0,
'min' => null,
'max' => null
]
]
]
],
'timezone' => 'Europe/London',
'trialExpiresAt' => '2023-04-01 00:00:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-NU-RESELLER-ID: <x-nu-reseller-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nuwebgroup.com/v1/partner/companies/{companyId}"
payload := strings.NewReader("{\n \"name\": \"Global Ticket Site\",\n \"alias\": \"globaltickets\",\n \"currencies\": [\n \"GBP\",\n \"USD\"\n ],\n \"countries\": [\n \"GB\"\n ],\n \"languages\": [\n \"en\"\n ],\n \"gateways\": [\n \"stripe\"\n ],\n \"features\": [],\n \"fees\": [\n {\n \"currency\": \"GBP\",\n \"typeId\": 1,\n \"salesPointTypeId\": 1,\n \"bands\": [\n {\n \"rangeMin\": 1,\n \"rangeMax\": null,\n \"fixed\": 100,\n \"percent\": 0,\n \"min\": null,\n \"max\": null\n }\n ]\n }\n ],\n \"timezone\": \"Europe/London\",\n \"trialExpiresAt\": \"2023-04-01 00:00:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-NU-RESELLER-ID", "<x-nu-reseller-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nuwebgroup.com/v1/partner/companies/{companyId}")
.header("X-NU-RESELLER-ID", "<x-nu-reseller-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Global Ticket Site\",\n \"alias\": \"globaltickets\",\n \"currencies\": [\n \"GBP\",\n \"USD\"\n ],\n \"countries\": [\n \"GB\"\n ],\n \"languages\": [\n \"en\"\n ],\n \"gateways\": [\n \"stripe\"\n ],\n \"features\": [],\n \"fees\": [\n {\n \"currency\": \"GBP\",\n \"typeId\": 1,\n \"salesPointTypeId\": 1,\n \"bands\": [\n {\n \"rangeMin\": 1,\n \"rangeMax\": null,\n \"fixed\": 100,\n \"percent\": 0,\n \"min\": null,\n \"max\": null\n }\n ]\n }\n ],\n \"timezone\": \"Europe/London\",\n \"trialExpiresAt\": \"2023-04-01 00:00:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuwebgroup.com/v1/partner/companies/{companyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-NU-RESELLER-ID"] = '<x-nu-reseller-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Global Ticket Site\",\n \"alias\": \"globaltickets\",\n \"currencies\": [\n \"GBP\",\n \"USD\"\n ],\n \"countries\": [\n \"GB\"\n ],\n \"languages\": [\n \"en\"\n ],\n \"gateways\": [\n \"stripe\"\n ],\n \"features\": [],\n \"fees\": [\n {\n \"currency\": \"GBP\",\n \"typeId\": 1,\n \"salesPointTypeId\": 1,\n \"bands\": [\n {\n \"rangeMin\": 1,\n \"rangeMax\": null,\n \"fixed\": 100,\n \"percent\": 0,\n \"min\": null,\n \"max\": null\n }\n ]\n }\n ],\n \"timezone\": \"Europe/London\",\n \"trialExpiresAt\": \"2023-04-01 00:00:00\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "companies",
"id": 9999,
"attributes": {
"name": "Global Ticket Site",
"alias": "globaltickets",
"createdAt": "2023-04-01T13:12:11.000000Z",
"updatedAt": "2023-04-01T13:12:11.000000Z",
"deletedAt": null
}
}
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "No query results for model [ModelName]."
}{
"message": "The given data was invalid.",
"errors": {
"field_name": [
"The field_name field is required"
]
}
}{
"message": "No query results for model [ModelName]."
}Update Company
This endpoint can be used to update a company within a given reseller account.
curl --request POST \
--url https://api.nuwebgroup.com/v1/partner/companies/{companyId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-NU-RESELLER-ID: <x-nu-reseller-id>' \
--data '
{
"name": "Global Ticket Site",
"alias": "globaltickets",
"currencies": [
"GBP",
"USD"
],
"countries": [
"GB"
],
"languages": [
"en"
],
"gateways": [
"stripe"
],
"features": [],
"fees": [
{
"currency": "GBP",
"typeId": 1,
"salesPointTypeId": 1,
"bands": [
{
"rangeMin": 1,
"rangeMax": null,
"fixed": 100,
"percent": 0,
"min": null,
"max": null
}
]
}
],
"timezone": "Europe/London",
"trialExpiresAt": "2023-04-01 00:00:00"
}
'import requests
url = "https://api.nuwebgroup.com/v1/partner/companies/{companyId}"
payload = {
"name": "Global Ticket Site",
"alias": "globaltickets",
"currencies": ["GBP", "USD"],
"countries": ["GB"],
"languages": ["en"],
"gateways": ["stripe"],
"features": [],
"fees": [
{
"currency": "GBP",
"typeId": 1,
"salesPointTypeId": 1,
"bands": [
{
"rangeMin": 1,
"rangeMax": None,
"fixed": 100,
"percent": 0,
"min": None,
"max": None
}
]
}
],
"timezone": "Europe/London",
"trialExpiresAt": "2023-04-01 00:00:00"
}
headers = {
"X-NU-RESELLER-ID": "<x-nu-reseller-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-NU-RESELLER-ID': '<x-nu-reseller-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Global Ticket Site',
alias: 'globaltickets',
currencies: ['GBP', 'USD'],
countries: ['GB'],
languages: ['en'],
gateways: ['stripe'],
features: [],
fees: [
{
currency: 'GBP',
typeId: 1,
salesPointTypeId: 1,
bands: [{rangeMin: 1, rangeMax: null, fixed: 100, percent: 0, min: null, max: null}]
}
],
timezone: 'Europe/London',
trialExpiresAt: '2023-04-01 00:00:00'
})
};
fetch('https://api.nuwebgroup.com/v1/partner/companies/{companyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nuwebgroup.com/v1/partner/companies/{companyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Global Ticket Site',
'alias' => 'globaltickets',
'currencies' => [
'GBP',
'USD'
],
'countries' => [
'GB'
],
'languages' => [
'en'
],
'gateways' => [
'stripe'
],
'features' => [
],
'fees' => [
[
'currency' => 'GBP',
'typeId' => 1,
'salesPointTypeId' => 1,
'bands' => [
[
'rangeMin' => 1,
'rangeMax' => null,
'fixed' => 100,
'percent' => 0,
'min' => null,
'max' => null
]
]
]
],
'timezone' => 'Europe/London',
'trialExpiresAt' => '2023-04-01 00:00:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-NU-RESELLER-ID: <x-nu-reseller-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nuwebgroup.com/v1/partner/companies/{companyId}"
payload := strings.NewReader("{\n \"name\": \"Global Ticket Site\",\n \"alias\": \"globaltickets\",\n \"currencies\": [\n \"GBP\",\n \"USD\"\n ],\n \"countries\": [\n \"GB\"\n ],\n \"languages\": [\n \"en\"\n ],\n \"gateways\": [\n \"stripe\"\n ],\n \"features\": [],\n \"fees\": [\n {\n \"currency\": \"GBP\",\n \"typeId\": 1,\n \"salesPointTypeId\": 1,\n \"bands\": [\n {\n \"rangeMin\": 1,\n \"rangeMax\": null,\n \"fixed\": 100,\n \"percent\": 0,\n \"min\": null,\n \"max\": null\n }\n ]\n }\n ],\n \"timezone\": \"Europe/London\",\n \"trialExpiresAt\": \"2023-04-01 00:00:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-NU-RESELLER-ID", "<x-nu-reseller-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nuwebgroup.com/v1/partner/companies/{companyId}")
.header("X-NU-RESELLER-ID", "<x-nu-reseller-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Global Ticket Site\",\n \"alias\": \"globaltickets\",\n \"currencies\": [\n \"GBP\",\n \"USD\"\n ],\n \"countries\": [\n \"GB\"\n ],\n \"languages\": [\n \"en\"\n ],\n \"gateways\": [\n \"stripe\"\n ],\n \"features\": [],\n \"fees\": [\n {\n \"currency\": \"GBP\",\n \"typeId\": 1,\n \"salesPointTypeId\": 1,\n \"bands\": [\n {\n \"rangeMin\": 1,\n \"rangeMax\": null,\n \"fixed\": 100,\n \"percent\": 0,\n \"min\": null,\n \"max\": null\n }\n ]\n }\n ],\n \"timezone\": \"Europe/London\",\n \"trialExpiresAt\": \"2023-04-01 00:00:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuwebgroup.com/v1/partner/companies/{companyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-NU-RESELLER-ID"] = '<x-nu-reseller-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Global Ticket Site\",\n \"alias\": \"globaltickets\",\n \"currencies\": [\n \"GBP\",\n \"USD\"\n ],\n \"countries\": [\n \"GB\"\n ],\n \"languages\": [\n \"en\"\n ],\n \"gateways\": [\n \"stripe\"\n ],\n \"features\": [],\n \"fees\": [\n {\n \"currency\": \"GBP\",\n \"typeId\": 1,\n \"salesPointTypeId\": 1,\n \"bands\": [\n {\n \"rangeMin\": 1,\n \"rangeMax\": null,\n \"fixed\": 100,\n \"percent\": 0,\n \"min\": null,\n \"max\": null\n }\n ]\n }\n ],\n \"timezone\": \"Europe/London\",\n \"trialExpiresAt\": \"2023-04-01 00:00:00\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "companies",
"id": 9999,
"attributes": {
"name": "Global Ticket Site",
"alias": "globaltickets",
"createdAt": "2023-04-01T13:12:11.000000Z",
"updatedAt": "2023-04-01T13:12:11.000000Z",
"deletedAt": null
}
}
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "No query results for model [ModelName]."
}{
"message": "The given data was invalid.",
"errors": {
"field_name": [
"The field_name field is required"
]
}
}{
"message": "No query results for model [ModelName]."
}Authorizations
The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your hub user credentials.
Headers
The ID of the reseller this operation should be performed against.
Path Parameters
The ID of the company you wish to update.
Body
Request body for updating a company.
This must be a unique, DNS compatible alias used to generate a subdomain for the company.
An array of locale codes to be enabled for the company. e.g. en, en_US, es_MX etc.
An array of gateway slugs to be enabled for the company.
Recalculate all item fees for the company. Defaults to false if not provided.
An array of usage fees to be applied to transactions within this company. You should provide fees for each combination of currency, item type and sales point you want fees to be applied to.
Show child attributes
Show child attributes
An array of slugs for features to be enabled for this company. A full list of available features can be retrieved via the Available features endpoint. Alternatively, passing * here will enable all available features for the company.
Default timezone for the company.
"Europe/London"
Parent company options. May not be used in combination with children.
Show child attributes
Show child attributes
Companies to associate as children of the company being created. May not be used in combination with parent.
Show child attributes
Show child attributes
Optionally, a default admin URL which users will be redirected to upon login.
"/events"
The maximum number of additional dates an organiser can setup for an event at one time, applicable to recursive and copy events. Defaults to 31, max 60.
The maximum number of timeslots permissible in a single event. Defaults to 30, max 100.
By default, company API access is disabled. To enable the API for this company, pass one of the below options. Note, to enable this feature, your reseller account must have access to the api_access company feature.
none, read_only, read_write The max number of requests that can be made within a 60s period.
Response
Successfully updated the company.
Show child attributes
Show child attributes
