{
  "opencollection": "1.0.0",
  "info": {
    "name": "Suger API Buyer API",
    "version": "1.0"
  },
  "items": [
    {
      "info": {
        "name": "Buyer",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Buyers",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.suger.cloud/org/:orgId/buyer",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "partner",
                "value": "",
                "type": "query",
                "description": "filter by partner"
              },
              {
                "name": "contactId",
                "value": "",
                "type": "query",
                "description": "filter by contactId"
              },
              {
                "name": "awsAccountId",
                "value": "",
                "type": "query",
                "description": "filter by awsAccountId"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "List pagination size, default 1000, max value is 1000"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query",
                "description": "List pagination offset, default 0"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "list buyers by the given organization with pagination and optional filters."
        },
        {
          "info": {
            "name": "Create Buyer",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.suger.cloud/org/:orgId/buyer",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "create a new buyer for Stripe or Adyen under the given organization."
        },
        {
          "info": {
            "name": "Get Buyer",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.suger.cloud/org/:orgId/buyer/:buyerId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "path",
                "description": "Buyer ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "get buyer by the given organization and buyer id."
        },
        {
          "info": {
            "name": "Update Buyer",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.suger.cloud/org/:orgId/buyer/:buyerId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "path",
                "description": "Buyer ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "update buyer by the given organization and buyer id."
        },
        {
          "info": {
            "name": "List Buyer's Wallets",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.suger.cloud/org/:orgId/buyer/:buyerId/wallet",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "path",
                "description": "Buyer ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "list all wallets of a buyer."
        },
        {
          "info": {
            "name": "Create Credit Wallet",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.suger.cloud/org/:orgId/buyer/:buyerId/wallet",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "path",
                "description": "Buyer ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "create a new credit wallet for the buyer."
        },
        {
          "info": {
            "name": "Update Credit Wallet",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.suger.cloud/org/:orgId/buyer/:buyerId/wallet/:walletId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "path",
                "description": "Buyer ID"
              },
              {
                "name": "walletId",
                "value": "",
                "type": "path",
                "description": "Wallet ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "update startTime or expireTime of the wallet."
        },
        {
          "info": {
            "name": "Delete Buyer Wallet",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.suger.cloud/org/:orgId/buyer/:buyerId/wallet/:walletId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "path",
                "description": "Buyer ID"
              },
              {
                "name": "walletId",
                "value": "",
                "type": "path",
                "description": "Wallet ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "delete a wallet of the buyer, if it's a payment method, sync to payment provider too."
        },
        {
          "info": {
            "name": "Close Credit Wallet",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.suger.cloud/org/:orgId/buyer/:buyerId/wallet/:walletId/close",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "path",
                "description": "Buyer ID"
              },
              {
                "name": "walletId",
                "value": "",
                "type": "path",
                "description": "Wallet ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Close the given credit wallet, if it's a payment method, sync to payment provider too. Once closed, it can't be used for payment."
        },
        {
          "info": {
            "name": "Set Buyer Default Wallet",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.suger.cloud/org/:orgId/buyer/:buyerId/wallet/:walletId/default",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "path",
                "description": "Buyer ID"
              },
              {
                "name": "walletId",
                "value": "",
                "type": "path",
                "description": "Wallet ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "set a payment method wallet as buyer's default wallet."
        }
      ]
    }
  ],
  "bundled": true
}