{
  "info": {
    "_postman_id": "4208bca7-bfcb-8744-7f7c-2bb5c39928dd",
    "name": "Partner API",
    "description": "All requests that include credentials or API keys must be sent over HTTPS (TLS 1.2 or higher). Cleartext HTTP is not supported.\n\nOther servers (set as baseUrl):\n- https://partner.snapfinance.co.uk (Production)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Get a token",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/token",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v1",
            "token"
          ],
          "variable": []
        },
        "description": "Attempts to get a token which can be used in the other APIs. The request body must include the clientId and clientSecret for the retailer. This endpoint is used when a broker/retailer needs to get a token. The response includes the newly created bearer token from Auth0.<br /><br /><strong>The token will be valid for 24 hours so please cache it so that you don't call for a token more than once a day.</strong>",
        "auth": {
          "type": "noauth"
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"clientId\": \"{{clientId}}\",\n  \"clientSecret\": \"{{clientSecret}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": [],
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "if (pm.response.code >= 200 && pm.response.code < 300) {",
              "  const body = pm.response.json();",
              "  pm.collectionVariables.set('token', body['token']);",
              "}"
            ]
          }
        }
      ]
    },
    {
      "name": "Create a Snap application and get a decision",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/partner/applications",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v1",
            "partner",
            "applications"
          ],
          "variable": []
        },
        "description": "Sends data to Snap for a customer to get finance offers. This endpoint is used to create an application in Snap, the payload includes the customer's name, address, and other relevant information to get a decision.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"partnerId\": {{partnerId}},\n  \"partnerRetailerId\": \"{{partnerRetailerId}}\",\n  \"partnerAppId\": 2345,\n  \"invoiceId\": \"12345678\",\n  \"applicationType\": \"EL\",\n  \"applicationSource\": \"Online\",\n  \"title\": \"Mr\",\n  \"firstName\": \"Andrew\",\n  \"lastName\": \"Hayden\",\n  \"birthdate\": \"13/12/1989\",\n  \"email\": \"ajones@snapfinance.co.uk\",\n  \"mobilePhone\": \"07777777777\",\n  \"homePhone\": \"07777777777\",\n  \"maritalStatus\": \"Single\",\n  \"marketingPreference\": {\n    \"email\": \"Yes\",\n    \"sms\": \"No\",\n    \"telephone\": \"No\",\n    \"post\": \"No\"\n  },\n  \"currentAddress\": {\n    \"postcode\": \"MK9 2BE\",\n    \"flat\": \"\",\n    \"houseName\": \"\",\n    \"houseNumber\": \"12\",\n    \"street\": \"Mattock Lane\",\n    \"city\": \"LONDON\",\n    \"yearsInAddress\": 1,\n    \"residenceType\": 2\n  },\n  \"employmentStatus\": \"Full Time\",\n  \"employmentIndustry\": 6,\n  \"employerName\": \"Snap\",\n  \"jobTitle\": \"Programmer\",\n  \"yearsWithEmployer\": 4,\n  \"netMonthlyIncome\": 1200,\n  \"incomeFrequency\": \"Monthly\",\n  \"benefitsType\": {\n    \"statePension\": \"Yes\",\n    \"universalCredit\": \"No\",\n    \"housingBenefit\": \"No\",\n    \"personalIndependencePayment\": \"No\",\n    \"employmentAndSupportAllowance\": \"No\",\n    \"attendanceAllowance\": \"No\",\n    \"pensionCredit\": \"No\",\n    \"carersAllowance\": \"No\",\n    \"disabilityLivingAllowance\": \"No\",\n    \"incomeSupport\": \"No\",\n    \"jobseekersAllowance\": \"No\",\n    \"childBenefit\": \"No\",\n    \"other\": \"No\"\n  },\n  \"numberOfDependants\": 0,\n  \"monthlyExpenditureTotal\": 1200,\n  \"monthlyExpenditureBreakdown\": {\n    \"householdBills\": 500,\n    \"transportAndTravel\": 100,\n    \"food\": 500,\n    \"clothingAndPersonalCosts\": 100,\n    \"other\": 0\n  },\n  \"creditCommitments\": 1500,\n  \"monthlyRentMortgage\": 500,\n  \"rentReason\": \"\",\n  \"bankDetails\": {\n    \"accountNumber\": \"11111111\",\n    \"accountSortCode\": \"111111\",\n    \"timeWithBank\": 1\n  },\n  \"loanDetails\": {\n    \"totalCashPrice\": 1200,\n    \"deposit\": 100,\n    \"loanAmount\": 1100,\n    \"loanTerm\": 24,\n    \"requestedApr\": 0.4999,\n    \"requestedInterestRate\": 0.8679,\n    \"requestedTotalInterest\": 300,\n    \"requestedTotalPayable\": 1400,\n    \"loanPurpose\": 1\n  },\n  \"deliveryDate\": \"01/10/2028\",\n  \"submissionDate\": \"01/10/2026 11:12:21\",\n  \"basket\": [\n    {\n      \"description\": \"Product Description\",\n      \"productID\": \"1234\",\n      \"price\": 1200,\n      \"quantity\": 1\n    }\n  ],\n  \"clientIp\": \"1.222.11.22\",\n  \"clientAgent\": \"Chrome\",\n  \"successUrl\": \"https://my-website.co.uk/snap-success\",\n  \"declineUrl\": \"https://my-website.co.uk/snap-decline\",\n  \"cancelUrl\": \"https://my-website.co.uk/snap-cancel\",\n  \"webhookUrl\": \"https://webhook.my-website.co.uk\",\n  \"redirectUrl\": false\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "Cancel Request",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/partner/cancel",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v1",
            "partner",
            "cancel"
          ],
          "variable": []
        },
        "description": "Attempts to cancel Application. The request body must include the partnerId, partnerAppId, partnerRetailerId, and reason for cancel. This endpoint is used when a broker/retailer needs to cancel application. The response includes the message from Snap App.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"partnerId\": {{partnerId}},\n  \"partnerAppId\": 1318,\n  \"partnerRetailerId\": \"{{partnerRetailerId}}\",\n  \"reason\": \"Customer cancelled the order\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "Change the delivery date of an application's order",
      "request": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/partner/delivery-date",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v1",
            "partner",
            "delivery-date"
          ],
          "variable": []
        },
        "description": "This endpoint is used when you would like to change the delivery date of an application's order",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"partnerId\": {{partnerId}},\n  \"partnerRetailerId\": \"{{partnerRetailerId}}\",\n  \"partnerAppId\": 1318,\n  \"deliveryDate\": \"25/12/2026\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "Fulfillment Request",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/partner/fulfillment",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v1",
            "partner",
            "fulfillment"
          ],
          "variable": []
        },
        "description": "Attempts to notify  about application has been delivered. The request body must include the partnerId, partnerAppId, partnerRetailerId. This endpoint is used when a broker/retailer needs to notify about application delivery. The response includes the message from Snap App.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"partnerId\": {{partnerId}},\n  \"partnerAppId\": 1318,\n  \"partnerRetailerId\": \"{{partnerRetailerId}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "Refund Request",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/partner/refund",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v1",
            "partner",
            "refund"
          ],
          "variable": []
        },
        "description": "Attempts to refund an application. The request body must include the partnerId, partnerAppId, and partnerRetailerId. This endpoint is used when a broker/retailer needs to request a refund for an application. The response includes the message from Snap App.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"partnerId\": {{partnerId}},\n  \"partnerAppId\": 1318,\n  \"partnerRetailerId\": \"{{partnerRetailerId}}\",\n  \"amount\": 100,\n  \"reason\": \"CUSTOMER_CHANGED_MIND\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "Amend a Snap application",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/partner/amendment",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v1",
            "partner",
            "amendment"
          ],
          "variable": []
        },
        "description": "Sends data to Snap to create an amendment for an application, the payload includes the loan details, the new invoice, and other relevant information to get a decision.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"partnerId\": {{partnerId}},\n  \"partnerRetailerId\": \"{{partnerRetailerId}}\",\n  \"partnerAppId\": 1318,\n  \"invoiceId\": \"MLXX-98\",\n  \"loanDetails\": {\n    \"totalCashPrice\": 1000,\n    \"deposit\": 0,\n    \"loanAmount\": 1000,\n    \"loanTerm\": 24,\n    \"requestedApr\": 0.4999,\n    \"requestedInterestRate\": 0.8679,\n    \"requestedTotalInterest\": 300.8,\n    \"requestedTotalPayable\": 1400.3,\n    \"loanPurpose\": 1\n  },\n  \"basket\": [\n    {\n      \"description\": \"Amended product description\",\n      \"productId\": \"DFFHR 200\",\n      \"price\": 1000,\n      \"quantity\": 1\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "Get the status of the application",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/partner/status",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v1",
            "partner",
            "status"
          ],
          "variable": []
        },
        "description": "This endpoint is used when you would like get the status of application",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"partnerId\": {{partnerId}},\n  \"partnerRetailerId\": \"{{partnerRetailerId}}\",\n  \"partnerAppId\": 1318\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "Authorization",
        "type": "string"
      },
      {
        "key": "value",
        "value": "Bearer {{token}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://partner-sandbox.snapfinance.co.uk",
      "type": "string"
    },
    {
      "key": "token",
      "value": "",
      "type": "string"
    },
    {
      "key": "clientId",
      "value": "",
      "type": "string"
    },
    {
      "key": "clientSecret",
      "value": "",
      "type": "string"
    },
    {
      "key": "partnerId",
      "value": "",
      "type": "string"
    },
    {
      "key": "partnerRetailerId",
      "value": "",
      "type": "string"
    }
  ]
}