Restore Company
curl --request POST \
--url https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore \
--header 'Authorization: Bearer <token>' \
--header 'X-NU-RESELLER-ID: <x-nu-reseller-id>'import requests
url = "https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore"
headers = {
"X-NU-RESELLER-ID": "<x-nu-reseller-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-NU-RESELLER-ID': '<x-nu-reseller-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore', 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}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-NU-RESELLER-ID", "<x-nu-reseller-id>")
req.Header.Add("Authorization", "Bearer <token>")
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}/restore")
.header("X-NU-RESELLER-ID", "<x-nu-reseller-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore")
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>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"type": "companies",
"attributes": {
"name": "Global ticket company",
"alias": "globalticketcompany",
"createdAt": "2023-01-01T13:57:01.000000Z",
"updatedAt": "2023-01-01T13:57:01.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]."
}Companies
Restore Company
This endpoint can be used to restore a deleted company for the given reseller.
POST
/
companies
/
{companyId}
/
restore
Restore Company
curl --request POST \
--url https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore \
--header 'Authorization: Bearer <token>' \
--header 'X-NU-RESELLER-ID: <x-nu-reseller-id>'import requests
url = "https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore"
headers = {
"X-NU-RESELLER-ID": "<x-nu-reseller-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-NU-RESELLER-ID': '<x-nu-reseller-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore', 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}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-NU-RESELLER-ID", "<x-nu-reseller-id>")
req.Header.Add("Authorization", "Bearer <token>")
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}/restore")
.header("X-NU-RESELLER-ID", "<x-nu-reseller-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuwebgroup.com/v1/partner/companies/{companyId}/restore")
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>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"type": "companies",
"attributes": {
"name": "Global ticket company",
"alias": "globalticketcompany",
"createdAt": "2023-01-01T13:57:01.000000Z",
"updatedAt": "2023-01-01T13:57:01.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 restore.
Response
Successfully restored the company.
Show child attributes
Show child attributes
⌘I
