{
  "opencollection": "1.0.0",
  "info": {
    "name": "Sage Accounting Bank Accounts Contacts API",
    "version": "3.1.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://www.sageone.com/oauth2/auth",
      "accessTokenUrl": "https://oauth.accounting.sage.com/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Contacts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Contacts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.accounting.sage.com/v3.1/contacts",
            "params": [
              {
                "name": "contact_type_ids",
                "value": "",
                "type": "query",
                "description": "Filter by contact type IDs (CUSTOMER, SUPPLIER)"
              },
              {
                "name": "search",
                "value": "",
                "type": "query",
                "description": "Search contacts by name or reference"
              },
              {
                "name": "page",
                "value": "",
                "type": "query"
              },
              {
                "name": "items_per_page",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Returns a paginated list of contacts (customers and suppliers). Supports filtering by contact type, search term, and date ranges."
        },
        {
          "info": {
            "name": "Create Contact",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.accounting.sage.com/v3.1/contacts",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new customer or supplier contact."
        },
        {
          "info": {
            "name": "Get Contact",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.accounting.sage.com/v3.1/contacts/:key",
            "params": [
              {
                "name": "key",
                "value": "",
                "type": "path",
                "description": "Contact unique identifier"
              }
            ]
          },
          "docs": "Returns a specific contact by ID."
        },
        {
          "info": {
            "name": "Update Contact",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.accounting.sage.com/v3.1/contacts/:key",
            "params": [
              {
                "name": "key",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates an existing contact."
        },
        {
          "info": {
            "name": "Delete Contact",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.accounting.sage.com/v3.1/contacts/:key",
            "params": [
              {
                "name": "key",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Deletes a contact if it has no associated transactions."
        }
      ]
    }
  ],
  "bundled": true
}