> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tangoanalytics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit monthly sales data (async)



## OpenAPI

````yaml /tango_lease/integrations/guides/sales-inbound-api.yaml put /v1/leasemgmt/sales
openapi: 3.1.0
info:
  title: Tango Sales Inbound API
  version: '1.1'
  description: |
    Async REST API: client posts monthly sales data to Tango for percentage-rent
    calculations. One of `lease_number` / `store_number` must be supplied
    (store_number alone is acceptable). Async pattern with gu_id polling.

    Uniqueness key for an error record_key is the tuple
    `(store_number;calendar_month;calendar_year;sales_category)`.
  x-direction: inbound
  x-source: Client System
  x-destination: Tango
servers:
  - url: https://api.tangoanalytics.com
    description: Production
  - url: https://testapi.tangoanalytics.com
    description: Test (SIT/UAT)
security:
  - xClientHeader: []
    xApiKeyHeader: []
tags:
  - name: Sales
  - name: Status
paths:
  /v1/leasemgmt/sales:
    put:
      tags:
        - Sales
      summary: Submit monthly sales data (async)
      operationId: putSalesBatch
      parameters:
        - $ref: '#/components/parameters/XClient'
        - $ref: '#/components/parameters/XApiKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesBatchRequest'
            examples:
              default:
                value:
                  records:
                    - lease_number: ''
                      store_number: 0-0
                      calendar_month: 1
                      calendar_year: 2020
                      effective_from: 1/1/2020
                      effective_to: 1/15/2020
                      sales_code: Jan
                      sales_category: SALES-GROSS
                      sale_exclusion: SALES
                      sales: 110
                      actual_forecast: ACTUAL
                      currency_code: USD
                      country: USA
      responses:
        '200':
          description: Accepted for async processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
components:
  parameters:
    XClient:
      name: x-client
      in: header
      required: true
      schema:
        type: string
    XApiKey:
      name: x-api-key
      in: header
      required: true
      schema:
        type: string
  schemas:
    SalesBatchRequest:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          items:
            $ref: '#/components/schemas/SalesRecord'
    AcceptedResponse:
      type: object
      required:
        - status
        - gu_id
      properties:
        status:
          type: string
          enum:
            - OK
            - Error
        status_message:
          type: string
        gu_id:
          type: string
          format: uuid
    SalesRecord:
      type: object
      description: |
        One of `lease_number` / `store_number` must be present; `store_number`
        is always required in practice (validation #1). If multiple leases are
        linked to a store, both `lease_number` and `store_number` must be sent.
      required:
        - store_number
        - sales_category
        - sale_exclusion
        - actual_forecast
        - country
      properties:
        lease_number:
          type: string
          description: Required only if store_number is not provided.
        store_number:
          type: string
          description: Store / location number.
        calendar_month:
          type: integer
          minimum: 1
          maximum: 12
          description: Calendar period in MM.
        calendar_year:
          type: integer
          description: Calendar year YYYY.
        effective_from:
          type: string
          description: Date in MM/DD/YYYY. Auto-populated if omitted.
        effective_to:
          type: string
          description: Date in MM/DD/YYYY. Auto-populated if omitted.
        sales_code:
          type: string
          description: Validate against lookup `PERCENT_RENT_SALES_CODE`.
        sales_category:
          type: string
          description: Validate against lookup `PERCENT_RENT_SALES_CATEGORY`.
        sale_exclusion:
          type: string
          description: Validate against lookup `PERCENT_RENT_SALES_EXCLUSION`.
        sales:
          type: number
          description: Sales amount.
        actual_forecast:
          type: string
          enum:
            - ACTUAL
            - FORECAST
        currency_code:
          type: string
        country:
          type: string
  securitySchemes:
    xClientHeader:
      type: apiKey
      in: header
      name: x-client
    xApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````