BlueCart Users API

Manage platform users and their roles and notifications.

OpenAPI Specification

bluecart-users-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: BlueCart Catalogs Users API
  version: '1.0'
  description: The BlueCart API is a REST API for the BlueCart wholesale ordering and procurement platform serving the hospitality and food and beverage industries. It exposes resource-oriented endpoints for managing orders, products, catalogs, clients, and users, returning JSON-encoded responses with standard HTTP status codes. The API is authenticated using AWS Signature Version 4 against the AWS execute-api service in the us-east-1 region, operates on a single object per request (no bulk updates), and uses next-token pagination returning 25 items per page on collection endpoints. This specification was generated from the public BlueCart API documentation at https://docs.bluecart.com/.
  contact:
    name: BlueCart
    url: https://www.bluecart.com/contact
  x-generated-from: documentation
  x-last-validated: '2026-06-02'
servers:
- url: https://{invokeUrl}
  description: BlueCart API AWS API Gateway invoke URL. The concrete host is provided in the BlueCart-supplied Postman collection (variable) and via your BlueCart account; it is not published in the public docs.
  variables:
    invokeUrl:
      default: api.bluecart.com
      description: AWS API Gateway invoke URL for the BlueCart API.
security:
- awsSigV4: []
  apiKey: []
tags:
- name: Users
  description: Manage platform users and their roles and notifications.
paths:
  /users/:
    get:
      operationId: listUsers
      summary: List Users
      description: Retrieves a page of users. Use the returned nextToken to page through results.
      tags:
      - Users
      parameters:
      - $ref: '#/components/parameters/NextToken'
      responses:
        '200':
          description: A page of users.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserList'
              examples:
                ListUsers200Example:
                  summary: Default listUsers 200 response
                  x-microcks-default: true
                  value:
                    users:
                    - id: 3001
                      firstName: Alex
                      lastName: Morgan
                      email: alex.morgan@distributor.example
                      enabled: true
                      notify: true
                      role: Admin
                      phone: '+15555550123'
                      reportsTo: 3000
                      notificationTypes:
                      - OrderPlaced
                      - OrderShipped
                      creationDateTime: '2026-06-02T14:30:00Z'
                      lastUpdateDateTime: '2026-06-02T15:00:00Z'
                    nextToken: eyJsYXN0SWQiOjMwMDF9
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createUser
      summary: Create A User
      description: Creates a new platform user.
      tags:
      - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreate'
            examples:
              CreateUserRequestExample:
                summary: Default createUser request
                x-microcks-default: true
                value:
                  firstName: Alex
                  lastName: Morgan
                  email: alex.morgan@distributor.example
                  enabled: true
                  notify: true
                  role: Admin
                  phone: '+15555550123'
                  reportsTo: 3000
                  notificationTypes:
                  - OrderPlaced
                  - OrderShipped
      responses:
        '200':
          description: The created user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                CreateUser200Example:
                  summary: Default createUser 200 response
                  x-microcks-default: true
                  value:
                    id: 3001
                    firstName: Alex
                    lastName: Morgan
                    email: alex.morgan@distributor.example
                    enabled: true
                    notify: true
                    role: Admin
                    phone: '+15555550123'
                    reportsTo: 3000
                    notificationTypes:
                    - OrderPlaced
                    - OrderShipped
                    creationDateTime: '2026-06-02T14:30:00Z'
                    lastUpdateDateTime: '2026-06-02T15:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /users/{id}:
    get:
      operationId: retrieveUser
      summary: Retrieve A User
      description: Retrieves a single user by its identifier.
      tags:
      - Users
      parameters:
      - $ref: '#/components/parameters/UserId'
      responses:
        '200':
          description: The requested user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                RetrieveUser200Example:
                  summary: Default retrieveUser 200 response
                  x-microcks-default: true
                  value:
                    id: 3001
                    firstName: Alex
                    lastName: Morgan
                    email: alex.morgan@distributor.example
                    enabled: true
                    notify: true
                    role: Admin
                    phone: '+15555550123'
                    reportsTo: 3000
                    notificationTypes:
                    - OrderPlaced
                    - OrderShipped
                    creationDateTime: '2026-06-02T14:30:00Z'
                    lastUpdateDateTime: '2026-06-02T15:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: updateUser
      summary: Update A User
      description: Updates an existing user identified by its identifier.
      tags:
      - Users
      parameters:
      - $ref: '#/components/parameters/UserId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreate'
            examples:
              UpdateUserRequestExample:
                summary: Default updateUser request
                x-microcks-default: true
                value:
                  firstName: Alex
                  lastName: Morgan
                  email: alex.morgan@distributor.example
                  enabled: true
                  notify: true
                  role: Admin
                  phone: '+15555550123'
                  reportsTo: 3000
                  notificationTypes:
                  - OrderPlaced
                  - OrderShipped
      responses:
        '200':
          description: The updated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                UpdateUser200Example:
                  summary: Default updateUser 200 response
                  x-microcks-default: true
                  value:
                    id: 3001
                    firstName: Alex
                    lastName: Morgan
                    email: alex.morgan@distributor.example
                    enabled: true
                    notify: true
                    role: Admin
                    phone: '+15555550123'
                    reportsTo: 3000
                    notificationTypes:
                    - OrderPlaced
                    - OrderShipped
                    creationDateTime: '2026-06-02T14:30:00Z'
                    lastUpdateDateTime: '2026-06-02T15:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: disableUser
      summary: Disable A User
      description: Disables a user identified by its identifier.
      tags:
      - Users
      parameters:
      - $ref: '#/components/parameters/UserId'
      responses:
        '200':
          description: True when the user was disabled.
          content:
            application/json:
              schema:
                type: boolean
                example: true
              examples:
                DisableUser200Example:
                  summary: Default disableUser 200 response
                  x-microcks-default: true
                  value: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  responses:
    Unauthorized:
      description: Authentication failed or credentials were missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    UserId:
      name: id
      in: path
      description: User identifier.
      required: true
      schema:
        type: integer
        format: int64
    NextToken:
      name: nextToken
      in: query
      description: Pagination token returned by a previous page; omit for the first page.
      required: false
      schema:
        type: string
  schemas:
    User:
      title: User
      type: object
      description: A platform user.
      x-schema-source: documentation
      x-source-url: https://docs.bluecart.com/endpoints
      properties:
        id:
          type: integer
          format: int64
          example: 3001
        firstName:
          type: string
          example: Alex
        lastName:
          type: string
          example: Morgan
        email:
          type: string
          format: email
          example: alex.morgan@distributor.example
        enabled:
          type: boolean
          example: true
        notify:
          type: boolean
          example: true
        role:
          type: string
          example: Admin
        phone:
          type: string
          example: '+15555550123'
        reportsTo:
          type: integer
          format: int64
          example: 3000
        notificationTypes:
          type: array
          items:
            type: string
          example:
          - OrderPlaced
          - OrderShipped
        creationDateTime:
          type: string
          format: date-time
          example: '2026-06-02T14:30:00Z'
        lastUpdateDateTime:
          type: string
          format: date-time
          example: '2026-06-02T15:00:00Z'
    Error:
      title: Error
      type: object
      description: Standard error response.
      properties:
        message:
          type: string
          description: Human-readable error message.
          example: Order not found.
    UserList:
      title: UserList
      type: object
      description: A paginated list of users.
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/User'
        nextToken:
          type: string
          example: eyJsYXN0SWQiOjMwMDF9
    UserCreate:
      title: UserCreate
      type: object
      description: Payload for creating or updating a user.
      required:
      - firstName
      - lastName
      - email
      properties:
        firstName:
          type: string
          example: Alex
        lastName:
          type: string
          example: Morgan
        email:
          type: string
          format: email
          example: alex.morgan@distributor.example
        enabled:
          type: boolean
          example: true
        notify:
          type: boolean
          example: true
        role:
          type: string
          example: Admin
        phone:
          type: string
          example: '+15555550123'
        reportsTo:
          type: integer
          format: int64
          example: 3000
        notificationTypes:
          type: array
          items:
            type: string
          example:
          - OrderPlaced
          - OrderShipped
  securitySchemes:
    awsSigV4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4 authorization against the AWS execute-api service in us-east-1. Requires an Access Key ID, Secret Access Key, and API Key generated in the BlueCart app under Settings, API Access Credentials. The API Key is supplied via the x-api-key header.
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: BlueCart API Key generated under Settings, API Access Credentials.