> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Job

> Check the processing status of a foreign securities P&L job.



## OpenAPI

````yaml api-reference/it/calculator/openapi.json POST /it/calculator/pnl/securities/foreign
openapi: 3.1.0
info:
  title: Sandbox API [Prod]
  version: '1.0'
servers:
  - url: https://test-api.sandbox.co.in
    description: test
  - url: https://api.sandbox.co.in
    description: prod
security:
  - {}
paths:
  /it/calculator/pnl/securities/foreign:
    post:
      tags:
        - pnl
        - securities
        - foreign
      summary: Submit P&L Job
      parameters:
        - name: input_file_key
          in: query
          schema:
            type: string
          example: foreign/52218293-e3a4-47bd-8921-32ab31d178fb/workbook.input
        - name: input
          in: query
          required: true
          description: >-
            Type of input file. Allowed values: tradewise_settlement or
            tradebook.
          deprecated: false
          schema:
            type: string
            default: tradewise_settlement
            enum:
              - tradewise_settlement
              - ' tradebook'
          example: tradewise_settlement
        - name: from
          in: query
          required: true
          description: >-
            Start timestamp (inclusive) for the P&L calculation period,
            expressed as Unix epoch time in milliseconds.
          deprecated: false
          schema:
            type: number
            minimum: 0
          example: '1705682801000'
        - name: to
          in: query
          required: true
          description: >-
            End timestamp (inclusive) for the P&L calculation period, expressed
            as Unix epoch time in milliseconds.
          deprecated: false
          schema:
            type: number
            minimum: 0
          example: '1736949453011'
        - name: output
          in: query
          required: true
          description: 'Type of output file. Allowed values: tradewise_pnl or scripwise_pnl'
          deprecated: false
          schema:
            type: string
            default: tradewise_pnl
            enum:
              - tradewise_pnl
              - ' scripwise_pnl'
          example: tradewise_pnl
        - name: output_file_key
          in: query
          schema:
            type: string
          example: foreign/52218293-e3a4-47bd-8921-32ab31d178fb/workbook.output
        - name: bucket
          in: query
          schema:
            type: string
          example: in-co-sbox-it-calc-sec-tax-pnl-bucket-dev
        - name: x-accept-type
          in: header
          required: true
          description: application/json or application/xlsx
          deprecated: false
          schema:
            type: string
          example: application/xlsx
        - name: x-api-key
          in: header
          required: true
          description: Your API key used to authenticate and authorize the request.
          deprecated: false
          schema:
            type: string
          example: '{{api_key}}'
        - name: x-api-version
          in: header
          required: true
          description: >-
            Indicates the version of the API you want to use. Ensures
            backward-compatible behavior.
          deprecated: false
          schema:
            type: string
          example: '{{version}}'
        - name: Authorization
          in: header
          required: true
          description: 'Token for user-level authorization. '
          deprecated: false
          schema:
            type: string
          example: '{{access_token}}'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction_id:
                    type: string
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      job_id:
                        type: string
                      url:
                        type: string
                        format: uri
                  timestamp:
                    type: string
                    format: utc-millisec
              example:
                transaction_id: df7e958a-3837-400d-a169-4337351915da
                code: 200
                data:
                  job_id: df7e958a-3837-400d-a169-4337351915da
                  url: >-
                    https://s3.ap-south-1.amazonaws.com/in-co-sandbox-it-calculator-securities-tax-pnl-dev/df7e958a-3837-400d-a169-4337351915da.input?X-Amz-Security-Token=EXAMPLE_SECURITY_TOKEN&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230919T100048Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86399&X-Amz-Credential=EXAMPLEACCESSKEY%2F20230919%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=EXAMPLE_SIGNATURE
                timestamp: '1695117648000'
        '400':
          description: Invalid Params
          headers:
            Date:
              schema:
                type: string
              example: Tue, 19 Sep 2023 10:01:35 GMT
            Content-Length:
              schema:
                type: integer
              example: '67'
            Connection:
              schema:
                type: string
              example: keep-alive
            x-amzn-RequestId:
              schema:
                type: string
              example: 1a7d325e-ee89-4b56-a4f0-b85515b949bf
            x-amzn-ErrorType:
              schema:
                type: string
              example: BadRequestException
            x-amz-apigw-id:
              schema:
                type: string
              example: Lf6sBEBPhcwFrpQ=
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    format: style
              example:
                message: 'Missing required request parameters: [output, input]'

````