{
  "opencollection": "1.0.0",
  "info": {
    "name": "Suger API Offer API",
    "version": "1.0"
  },
  "items": [
    {
      "info": {
        "name": "Offer",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create Or Update Draft Offer",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.suger.cloud/org/:orgId/draftOffer",
            "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 draft offer or update the existing draft offer. When updating draft offer, the offer.ID is required."
        },
        {
          "info": {
            "name": "List Offers",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.suger.cloud/org/:orgId/offer",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "filter by offer status"
              },
              {
                "name": "partner",
                "value": "",
                "type": "query",
                "description": "filter by partner"
              },
              {
                "name": "offerType",
                "value": "",
                "type": "query",
                "description": "filter by offerType"
              },
              {
                "name": "productId",
                "value": "",
                "type": "query",
                "description": "filter by productId"
              },
              {
                "name": "buyerId",
                "value": "",
                "type": "query",
                "description": "filter by buyerId"
              },
              {
                "name": "hubspotDealId",
                "value": "",
                "type": "query",
                "description": "filter by hubspotDealId"
              },
              {
                "name": "contactId",
                "value": "",
                "type": "query",
                "description": "filter by contactId"
              },
              {
                "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 offers under the given organization with pagination and optional filter."
        },
        {
          "info": {
            "name": "Create Offer",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.suger.cloud/org/:orgId/offer",
            "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 private offer under the given organization."
        },
        {
          "info": {
            "name": "Get Offer",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.suger.cloud/org/:orgId/offer/:offerId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerId",
                "value": "",
                "type": "path",
                "description": "Offer ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Get the offer by the given offer ID."
        },
        {
          "info": {
            "name": "Delete Offer",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.suger.cloud/org/:orgId/offer/:offerId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerId",
                "value": "",
                "type": "path",
                "description": "Offer ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "The offer is soft deleted (marked as DELETED status) in Suger service. Only the offer with status = \"DRAFT\", \"CREATE_FAILED\", \"EXPIRED\" or \"CANCELLED\" is allowed to be deleted."
        },
        {
          "info": {
            "name": "Cancel Offer",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.suger.cloud/org/:orgId/offer/:offerId/cancel",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerId",
                "value": "",
                "type": "path",
                "description": "Offer ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Only the offer with status = \"PENDING_ACCEPTANCE\", \"PENDING_CANCEL\", \"ACTIVE\" or \"USED\" is allowed to cancel."
        },
        {
          "info": {
            "name": "Get Offer EULA",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.suger.cloud/org/:orgId/offer/:offerId/eula",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerId",
                "value": "",
                "type": "path",
                "description": "Offer ID"
              },
              {
                "name": "format",
                "value": "",
                "type": "query",
                "description": "response format in JSON or string"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Get the EULA file of the given offer ID."
        },
        {
          "info": {
            "name": "Extend Offer Expiry Date",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.suger.cloud/org/:orgId/offer/:offerId/extendExpiryDate",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerId",
                "value": "",
                "type": "path",
                "description": "Offer ID"
              },
              {
                "name": "newExpiryDate",
                "value": "",
                "type": "query",
                "description": "new expiry date in YYYY-MM-DD format"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Only the offer with status = \"PENDING_ACCEPTANCE\", \"EXPIRED\" or \"ACCEPTED\" is allowed to extend expiry date."
        },
        {
          "info": {
            "name": "Update Offer Meta Info",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.suger.cloud/org/:orgId/offer/:offerId/metaInfo",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerId",
                "value": "",
                "type": "path",
                "description": "Offer ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Update the meta info of the given offer."
        },
        {
          "info": {
            "name": "Notify Offer Contacts",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.suger.cloud/org/:orgId/offer/:offerId/notifyContacts",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerId",
                "value": "",
                "type": "path",
                "description": "Offer ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Send offer notifications to the given contact ids. If contactIDs is empty, send notifications to all contacts of the offer."
        },
        {
          "info": {
            "name": "Get Offer Reseller EULA",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.suger.cloud/org/:orgId/offer/:offerId/resellerEula",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerId",
                "value": "",
                "type": "path",
                "description": "Offer ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Get the Reseller EULA file of the given offer ID."
        },
        {
          "info": {
            "name": "Get Offer By External ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.suger.cloud/org/:orgId/offerExternalId/:offerExternalId",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path",
                "description": "Organization ID"
              },
              {
                "name": "offerExternalId",
                "value": "",
                "type": "path",
                "description": "Offer External ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Get the offer by the given offer external ID."
        }
      ]
    }
  ],
  "bundled": true
}