---
swagger: "2.0"
info:
  description: "Some useful API endpoints to be used by StreetLib partners"
  version: "2023-05-30T15:08:08Z"
  title: "staging-streetlib-api-partner"
  termsOfService: "https://streetlib.com"
  contact:
    name: "Giacomo D'Angelo"
    url: "https://streetlib.com"
    email: "support@streetlib.com"
host: "staging-api.streetlib.com"
basePath: "/partners"
schemes:
- "https"
paths:
  /affiliate/signup:
    post:
      summary: "Create a new StreetLib user"
      description: "This method allow you to create a Streetlib user on behalf of\
        \ your company.\n"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - in: "body"
        name: "UserRequest"
        required: true
        schema:
          $ref: "#/definitions/UserRequest"
      responses:
        "200":
          description: "200 response"
          schema:
            $ref: "#/definitions/UserResponse"
      security:
      - api_key: []
    options:
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "200 response"
          headers:
            Access-Control-Allow-Origin:
              type: "string"
            Access-Control-Allow-Methods:
              type: "string"
            Access-Control-Allow-Headers:
              type: "string"
  /countries:
    get:
      summary: "Get list of countries and relative IDs to be used in countryId field\
        \ for user signup"
      description: "To create a new user with the /affiliate/signup POST method you\
        \ need to pass a countryId field you can get from this endpoint.\n"
      produces:
      - "application/json"
      responses:
        "200":
          description: "200 response"
          schema:
            $ref: "#/definitions/CountriesResponse"
      security:
      - api_key: []
    options:
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "200 response"
          headers:
            Access-Control-Allow-Origin:
              type: "string"
            Access-Control-Allow-Methods:
              type: "string"
            Access-Control-Allow-Headers:
              type: "string"
  /timezones:
    get:
      summary: "Get list of timezones to be used in timezone field for user signup"
      description: "To create a new user with the /affiliate/signup POST method you\
        \ need to pass a timezone field you can get from this endpoint.\n"
      produces:
      - "application/json"
      responses:
        "200":
          description: "200 response"
          schema:
            $ref: "#/definitions/TimezonesResponse"
      security:
      - api_key: []
    options:
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "200 response"
          headers:
            Access-Control-Allow-Origin:
              type: "string"
            Access-Control-Allow-Methods:
              type: "string"
            Access-Control-Allow-Headers:
              type: "string"
securityDefinitions:
  api_key:
    type: "apiKey"
    name: "x-api-key"
    in: "header"
definitions:
  UserResponse:
    type: "array"
    items:
      type: "object"
      properties:
        firstname:
          type: "string"
        penName:
          type: "string"
        streetlibId:
          type: "string"
        timezone:
          type: "string"
        companyName:
          type: "string"
        tmpPassword:
          type: "string"
        language:
          type: "string"
        lastname:
          type: "string"
        createdAt:
          type: "string"
        customerType:
          type: "string"
        countryCode:
          type: "string"
        action:
          type: "string"
        email:
          type: "string"
        username:
          type: "string"
  TimezonesResponse:
    type: "array"
    items:
      type: "object"
      properties:
        tz:
          type: "string"
        description:
          type: "string"
  CountriesResponse:
    type: "array"
    items:
      type: "object"
      properties:
        alpha2:
          type: "string"
        name:
          type: "string"
        alpha3:
          type: "string"
        id:
          type: "string"
  UserRequest:
    type: "object"
    properties:
      firstname:
        type: "string"
      customerType:
        type: "string"
      penName:
        type: "string"
      timezone:
        type: "string"
      companyName:
        type: "string"
      language:
        type: "string"
      email:
        type: "string"
      countryId:
        type: "string"
      lastname:
        type: "string"
