API Documentation (Postman Collection) for Web Application

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

API Documentation (Postman Collection) for Web Application

Postman Collection is a JSON/YAML format (Collection v2.1) that describes HTTP requests, environment variables, tests, and response examples. Unlike OpenAPI, it is oriented toward manual testing and team collaboration rather than documentation generation. It is published on the Postman API Network or exported as a file for onboarding new developers.

Collection Structure

{
  "info": {
    "name": "MyApp API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "base_url", "value": "https://api.example.com/v1" },
    { "key": "token", "value": "" }
  ],
  "item": [
    {
      "name": "Auth",
      "item": [
        {
          "name": "Login",
          "request": {
            "method": "POST",
            "url": "{{base_url}}/auth/login",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\"email\": \"[email protected]\", \"password\": \"secret\"}"
            }
          },
          "event": [{
            "listen": "test",
            "script": {
              "exec": [
                "pm.test('Status 200', () => pm.response.to.have.status(200));",
                "const json = pm.response.json();",
                "pm.collectionVariables.set('token', json.data.token);"
              ]
            }
          }]
        }
      ]
    }
  ]
}

pm.collectionVariables.set is the key pattern: the login test automatically saves the token, and all subsequent requests use {{token}} in the Authorization header.

Environments — Different Environments

{
  "name": "Production",
  "values": [
    { "key": "base_url", "value": "https://api.example.com/v1", "enabled": true },
    { "key": "token", "value": "", "enabled": true }
  ]
}

Separate files env.development.json, env.staging.json, env.production.json are switched in Postman via dropdown. Files with secrets are not committed to the repository (.gitignore), templates without values are committed.

Pre-request Scripts

// Automatically refresh token before each request
const tokenExpiry = pm.collectionVariables.get('token_expiry');
if (!tokenExpiry || Date.now() > parseInt(tokenExpiry)) {
    pm.sendRequest({
        url: pm.variables.get('base_url') + '/auth/refresh',
        method: 'POST',
        header: { 'Content-Type': 'application/json' },
        body: {
            mode: 'raw',
            raw: JSON.stringify({ refresh_token: pm.collectionVariables.get('refresh_token') })
        }
    }, (err, res) => {
        pm.collectionVariables.set('token', res.json().data.access_token);
        pm.collectionVariables.set('token_expiry', Date.now() + 3600000);
    });
}

Generation from OpenAPI

# Import openapi.yaml into collection via Postman CLI
postman collection convert openapi.yaml --output collection.json

# Or via API
curl -X POST https://api.getpostman.com/collections \
  -H "X-Api-Key: $POSTMAN_API_KEY" \
  -d @collection.json

Conversely, you can export Collection to OpenAPI via Postman UI (Export → OpenAPI 3.0).

Newman — Running in CI

npm install -g newman

newman run collection.json \
  --environment env.staging.json \
  --reporters cli,junit \
  --reporter-junit-export results/newman.xml

GitHub Actions integration:

- name: Run API Tests
  run: |
    newman run collection.json \
      --environment env.ci.json \
      --bail failure

--bail failure stops the run on the first error, convenient for smoke tests after deployment.

Publishing Documentation

Postman allows you to publish a collection as interactive documentation on <team>.postman.co/docs. Auto-update via Postman API:

curl -X PUT "https://api.getpostman.com/collections/$COLLECTION_ID" \
  -H "X-Api-Key: $POSTMAN_API_KEY" \
  -d @collection.json

Timeline

Creating a collection for an API (20–30 endpoints, environment variables, tests with auto-token saving): 1–2 days. With Newman in CI, pre-request scripts, documentation publishing: 1 additional day.