Update Organization
Update an organization.
Scopes: organizations:write
package main
import(
"context"
"os"
macropaygo "github.com/web3group/macropay-go-main"
"github.com/web3group/macropay-go-main/models/components"
"log"
)
func main() {
ctx := context.Background()
s := macropaygo.New(
macropaygo.WithSecurity(os.Getenv("MACROPAY_ACCESS_TOKEN")),
)
res, err := s.Organizations.Update(ctx, "1dbfc517-0bbf-4301-9ba8-555ca42b9737", components.OrganizationUpdate{})
if err != nil {
log.Fatal(err)
}
if res.Organization != nil {
// handle response
}
}from macropay_sdk import Macropay
with Macropay(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as macropay:
res = macropay.organizations.update(id="1dbfc517-0bbf-4301-9ba8-555ca42b9737", organization_update={})
# Handle response
print(res)import { Macropay } from "@macropayments/sdk";
const macropay = new Macropay({
accessToken: process.env["MACROPAY_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await macropay.organizations.update({
id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
organizationUpdate: {},
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Macropay;
use Macropay\Models\Components;
$sdk = Macropay\Macropay::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$organizationUpdate = new Components\OrganizationUpdate();
$response = $sdk->organizations->update(
id: '1dbfc517-0bbf-4301-9ba8-555ca42b9737',
organizationUpdate: $organizationUpdate
);
if ($response->organization !== null) {
// handle response
}curl --request PATCH \
--url https://api.macropay.ai/v1/organizations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"avatar_url": "<string>",
"email": "jsmith@example.com",
"website": "<string>",
"socials": [
{
"url": "<string>"
}
],
"details": {
"about": "<string>",
"product_description": "<string>",
"intended_use": "<string>",
"customer_acquisition": [
"<string>"
],
"future_annual_revenue": 1,
"switching": true,
"previous_annual_revenue": 0
},
"feature_settings": {
"issue_funding_enabled": false,
"seat_based_pricing_enabled": false,
"revops_enabled": false,
"wallets_enabled": false,
"member_model_enabled": false
},
"subscription_settings": {
"allow_multiple_subscriptions": true,
"allow_customer_updates": true,
"benefit_revocation_grace_period": 123,
"prevent_trial_abuse": true
},
"notification_settings": {
"new_order": true,
"new_subscription": true
},
"customer_email_settings": {
"order_confirmation": true,
"subscription_cancellation": true,
"subscription_confirmation": true,
"subscription_cycled": true,
"subscription_past_due": true,
"subscription_revoked": true,
"subscription_uncanceled": true,
"subscription_updated": true
},
"customer_portal_settings": {
"usage": {
"show": true
},
"subscription": {
"update_seats": true,
"update_plan": true
}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
avatar_url: '<string>',
email: 'jsmith@example.com',
website: '<string>',
socials: [{url: '<string>'}],
details: {
about: '<string>',
product_description: '<string>',
intended_use: '<string>',
customer_acquisition: ['<string>'],
future_annual_revenue: 1,
switching: true,
previous_annual_revenue: 0
},
feature_settings: {
issue_funding_enabled: false,
seat_based_pricing_enabled: false,
revops_enabled: false,
wallets_enabled: false,
member_model_enabled: false
},
subscription_settings: {
allow_multiple_subscriptions: true,
allow_customer_updates: true,
benefit_revocation_grace_period: 123,
prevent_trial_abuse: true
},
notification_settings: {new_order: true, new_subscription: true},
customer_email_settings: {
order_confirmation: true,
subscription_cancellation: true,
subscription_confirmation: true,
subscription_cycled: true,
subscription_past_due: true,
subscription_revoked: true,
subscription_uncanceled: true,
subscription_updated: true
},
customer_portal_settings: {usage: {show: true}, subscription: {update_seats: true, update_plan: true}}
})
};
fetch('https://api.macropay.ai/v1/organizations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.macropay.ai/v1/organizations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"website\": \"<string>\",\n \"socials\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"details\": {\n \"about\": \"<string>\",\n \"product_description\": \"<string>\",\n \"intended_use\": \"<string>\",\n \"customer_acquisition\": [\n \"<string>\"\n ],\n \"future_annual_revenue\": 1,\n \"switching\": true,\n \"previous_annual_revenue\": 0\n },\n \"feature_settings\": {\n \"issue_funding_enabled\": false,\n \"seat_based_pricing_enabled\": false,\n \"revops_enabled\": false,\n \"wallets_enabled\": false,\n \"member_model_enabled\": false\n },\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": true,\n \"allow_customer_updates\": true,\n \"benefit_revocation_grace_period\": 123,\n \"prevent_trial_abuse\": true\n },\n \"notification_settings\": {\n \"new_order\": true,\n \"new_subscription\": true\n },\n \"customer_email_settings\": {\n \"order_confirmation\": true,\n \"subscription_cancellation\": true,\n \"subscription_confirmation\": true,\n \"subscription_cycled\": true,\n \"subscription_past_due\": true,\n \"subscription_revoked\": true,\n \"subscription_uncanceled\": true,\n \"subscription_updated\": true\n },\n \"customer_portal_settings\": {\n \"usage\": {\n \"show\": true\n },\n \"subscription\": {\n \"update_seats\": true,\n \"update_plan\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.macropay.ai/v1/organizations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"website\": \"<string>\",\n \"socials\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"details\": {\n \"about\": \"<string>\",\n \"product_description\": \"<string>\",\n \"intended_use\": \"<string>\",\n \"customer_acquisition\": [\n \"<string>\"\n ],\n \"future_annual_revenue\": 1,\n \"switching\": true,\n \"previous_annual_revenue\": 0\n },\n \"feature_settings\": {\n \"issue_funding_enabled\": false,\n \"seat_based_pricing_enabled\": false,\n \"revops_enabled\": false,\n \"wallets_enabled\": false,\n \"member_model_enabled\": false\n },\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": true,\n \"allow_customer_updates\": true,\n \"benefit_revocation_grace_period\": 123,\n \"prevent_trial_abuse\": true\n },\n \"notification_settings\": {\n \"new_order\": true,\n \"new_subscription\": true\n },\n \"customer_email_settings\": {\n \"order_confirmation\": true,\n \"subscription_cancellation\": true,\n \"subscription_confirmation\": true,\n \"subscription_cycled\": true,\n \"subscription_past_due\": true,\n \"subscription_revoked\": true,\n \"subscription_uncanceled\": true,\n \"subscription_updated\": true\n },\n \"customer_portal_settings\": {\n \"usage\": {\n \"show\": true\n },\n \"subscription\": {\n \"update_seats\": true,\n \"update_plan\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"avatar_url": "<string>",
"allow_customer_updates": true,
"email": "<string>",
"website": "<string>",
"socials": [
{
"url": "<string>"
}
],
"details_submitted_at": "2023-11-07T05:31:56Z",
"feature_settings": {
"issue_funding_enabled": false,
"seat_based_pricing_enabled": false,
"revops_enabled": false,
"wallets_enabled": false,
"member_model_enabled": false
},
"subscription_settings": {
"allow_multiple_subscriptions": true,
"allow_customer_updates": true,
"benefit_revocation_grace_period": 123,
"prevent_trial_abuse": true
},
"notification_settings": {
"new_order": true,
"new_subscription": true
},
"customer_email_settings": {
"order_confirmation": true,
"subscription_cancellation": true,
"subscription_confirmation": true,
"subscription_cycled": true,
"subscription_past_due": true,
"subscription_revoked": true,
"subscription_uncanceled": true,
"subscription_updated": true
},
"customer_portal_settings": {
"usage": {
"show": true
},
"subscription": {
"update_seats": true,
"update_plan": true
}
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
You can generate an Organization Access Token from your organization's settings.
Path Parameters
The organization ID.
"1dbfc517-0bbf-4301-9ba8-555ca42b9737"
Body
31 - 2083Public support email.
Official website of the organization.
1 - 2083Links to social profiles.
Show child attributes
Show child attributes
Additional, private, business details Macropay needs about active organizations for compliance (KYC).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Organization updated.
Creation timestamp of the object.
Last modification timestamp of the object.
The ID of the object.
Organization name shown in checkout, customer portal, emails etc.
Unique organization slug in checkout, customer portal and credit card statements.
Avatar URL shown in checkout, customer portal, emails etc.
Proration behavior applied when customer updates their subscription from the portal.
invoice, prorate Whether customers can update their subscriptions from the customer portal.
Public support email.
Official website of the organization.
Links to social profiles.
Show child attributes
Show child attributes
Current organization status
created, onboarding_started, initial_review, ongoing_review, denied, active When the business details were submitted.
Organization feature settings
Show child attributes
Show child attributes
Settings related to subscriptions management
Show child attributes
Show child attributes
Settings related to notifications
Show child attributes
Show child attributes
Settings related to customer emails
Show child attributes
Show child attributes
Settings related to the customer portal
Show child attributes
Show child attributes
package main
import(
"context"
"os"
macropaygo "github.com/web3group/macropay-go-main"
"github.com/web3group/macropay-go-main/models/components"
"log"
)
func main() {
ctx := context.Background()
s := macropaygo.New(
macropaygo.WithSecurity(os.Getenv("MACROPAY_ACCESS_TOKEN")),
)
res, err := s.Organizations.Update(ctx, "1dbfc517-0bbf-4301-9ba8-555ca42b9737", components.OrganizationUpdate{})
if err != nil {
log.Fatal(err)
}
if res.Organization != nil {
// handle response
}
}from macropay_sdk import Macropay
with Macropay(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as macropay:
res = macropay.organizations.update(id="1dbfc517-0bbf-4301-9ba8-555ca42b9737", organization_update={})
# Handle response
print(res)import { Macropay } from "@macropayments/sdk";
const macropay = new Macropay({
accessToken: process.env["MACROPAY_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await macropay.organizations.update({
id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
organizationUpdate: {},
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Macropay;
use Macropay\Models\Components;
$sdk = Macropay\Macropay::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$organizationUpdate = new Components\OrganizationUpdate();
$response = $sdk->organizations->update(
id: '1dbfc517-0bbf-4301-9ba8-555ca42b9737',
organizationUpdate: $organizationUpdate
);
if ($response->organization !== null) {
// handle response
}curl --request PATCH \
--url https://api.macropay.ai/v1/organizations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"avatar_url": "<string>",
"email": "jsmith@example.com",
"website": "<string>",
"socials": [
{
"url": "<string>"
}
],
"details": {
"about": "<string>",
"product_description": "<string>",
"intended_use": "<string>",
"customer_acquisition": [
"<string>"
],
"future_annual_revenue": 1,
"switching": true,
"previous_annual_revenue": 0
},
"feature_settings": {
"issue_funding_enabled": false,
"seat_based_pricing_enabled": false,
"revops_enabled": false,
"wallets_enabled": false,
"member_model_enabled": false
},
"subscription_settings": {
"allow_multiple_subscriptions": true,
"allow_customer_updates": true,
"benefit_revocation_grace_period": 123,
"prevent_trial_abuse": true
},
"notification_settings": {
"new_order": true,
"new_subscription": true
},
"customer_email_settings": {
"order_confirmation": true,
"subscription_cancellation": true,
"subscription_confirmation": true,
"subscription_cycled": true,
"subscription_past_due": true,
"subscription_revoked": true,
"subscription_uncanceled": true,
"subscription_updated": true
},
"customer_portal_settings": {
"usage": {
"show": true
},
"subscription": {
"update_seats": true,
"update_plan": true
}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
avatar_url: '<string>',
email: 'jsmith@example.com',
website: '<string>',
socials: [{url: '<string>'}],
details: {
about: '<string>',
product_description: '<string>',
intended_use: '<string>',
customer_acquisition: ['<string>'],
future_annual_revenue: 1,
switching: true,
previous_annual_revenue: 0
},
feature_settings: {
issue_funding_enabled: false,
seat_based_pricing_enabled: false,
revops_enabled: false,
wallets_enabled: false,
member_model_enabled: false
},
subscription_settings: {
allow_multiple_subscriptions: true,
allow_customer_updates: true,
benefit_revocation_grace_period: 123,
prevent_trial_abuse: true
},
notification_settings: {new_order: true, new_subscription: true},
customer_email_settings: {
order_confirmation: true,
subscription_cancellation: true,
subscription_confirmation: true,
subscription_cycled: true,
subscription_past_due: true,
subscription_revoked: true,
subscription_uncanceled: true,
subscription_updated: true
},
customer_portal_settings: {usage: {show: true}, subscription: {update_seats: true, update_plan: true}}
})
};
fetch('https://api.macropay.ai/v1/organizations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.macropay.ai/v1/organizations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"website\": \"<string>\",\n \"socials\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"details\": {\n \"about\": \"<string>\",\n \"product_description\": \"<string>\",\n \"intended_use\": \"<string>\",\n \"customer_acquisition\": [\n \"<string>\"\n ],\n \"future_annual_revenue\": 1,\n \"switching\": true,\n \"previous_annual_revenue\": 0\n },\n \"feature_settings\": {\n \"issue_funding_enabled\": false,\n \"seat_based_pricing_enabled\": false,\n \"revops_enabled\": false,\n \"wallets_enabled\": false,\n \"member_model_enabled\": false\n },\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": true,\n \"allow_customer_updates\": true,\n \"benefit_revocation_grace_period\": 123,\n \"prevent_trial_abuse\": true\n },\n \"notification_settings\": {\n \"new_order\": true,\n \"new_subscription\": true\n },\n \"customer_email_settings\": {\n \"order_confirmation\": true,\n \"subscription_cancellation\": true,\n \"subscription_confirmation\": true,\n \"subscription_cycled\": true,\n \"subscription_past_due\": true,\n \"subscription_revoked\": true,\n \"subscription_uncanceled\": true,\n \"subscription_updated\": true\n },\n \"customer_portal_settings\": {\n \"usage\": {\n \"show\": true\n },\n \"subscription\": {\n \"update_seats\": true,\n \"update_plan\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.macropay.ai/v1/organizations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"website\": \"<string>\",\n \"socials\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"details\": {\n \"about\": \"<string>\",\n \"product_description\": \"<string>\",\n \"intended_use\": \"<string>\",\n \"customer_acquisition\": [\n \"<string>\"\n ],\n \"future_annual_revenue\": 1,\n \"switching\": true,\n \"previous_annual_revenue\": 0\n },\n \"feature_settings\": {\n \"issue_funding_enabled\": false,\n \"seat_based_pricing_enabled\": false,\n \"revops_enabled\": false,\n \"wallets_enabled\": false,\n \"member_model_enabled\": false\n },\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": true,\n \"allow_customer_updates\": true,\n \"benefit_revocation_grace_period\": 123,\n \"prevent_trial_abuse\": true\n },\n \"notification_settings\": {\n \"new_order\": true,\n \"new_subscription\": true\n },\n \"customer_email_settings\": {\n \"order_confirmation\": true,\n \"subscription_cancellation\": true,\n \"subscription_confirmation\": true,\n \"subscription_cycled\": true,\n \"subscription_past_due\": true,\n \"subscription_revoked\": true,\n \"subscription_uncanceled\": true,\n \"subscription_updated\": true\n },\n \"customer_portal_settings\": {\n \"usage\": {\n \"show\": true\n },\n \"subscription\": {\n \"update_seats\": true,\n \"update_plan\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"avatar_url": "<string>",
"allow_customer_updates": true,
"email": "<string>",
"website": "<string>",
"socials": [
{
"url": "<string>"
}
],
"details_submitted_at": "2023-11-07T05:31:56Z",
"feature_settings": {
"issue_funding_enabled": false,
"seat_based_pricing_enabled": false,
"revops_enabled": false,
"wallets_enabled": false,
"member_model_enabled": false
},
"subscription_settings": {
"allow_multiple_subscriptions": true,
"allow_customer_updates": true,
"benefit_revocation_grace_period": 123,
"prevent_trial_abuse": true
},
"notification_settings": {
"new_order": true,
"new_subscription": true
},
"customer_email_settings": {
"order_confirmation": true,
"subscription_cancellation": true,
"subscription_confirmation": true,
"subscription_cycled": true,
"subscription_past_due": true,
"subscription_revoked": true,
"subscription_uncanceled": true,
"subscription_updated": true
},
"customer_portal_settings": {
"usage": {
"show": true
},
"subscription": {
"update_seats": true,
"update_plan": true
}
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}