> ## 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.

# Add Readings For Custom Meter

> A `POST` request will create a meter reading for the custom meter with a matching identifier.

> A constraint violation error will occur if a custom meter has an existing meter reading for a given timestamp.

##### Timestamp Format

The timestamp must be in the ISO 8601 standard format. The following are examples of supported formats:

| Format | Example |
| --- | --- |
| YYYY-MM-DDTHH:mm:ss.SSSZ | 2020-01-03T09:07:21.215Z |
| YYYY-MM-DDTHH:mm:ss.SSZ | 2020-01-03T09:07:21.21Z |
| YYYY-MM-DDTHH:mm:ss.SZ | 2020-01-03T09:07:21.2Z |
| YYYY-MM-DDTHH:mm:ss.SSS | 2020-01-03T09:07:21.215 |
| YYYY-MM-DDTHH:mm:ss.SS | 2020-01-03T09:07:21.21 |
| YYYY-MM-DDTHH:mm:ssZ | 2020-01-03T09:07:21Z |
| YYYY-MM-DDTHH:mm:ss | 2020-01-03T09:07:21 |
| YYYY-MM-DDTHH:mmZ | 2020-01-03T09:07Z |
| YYYY-MM-DDTHH:mm | 2020-01-03T09:07 |

##### Meter Reading Value Format

The maximum allowed scale for a meter reading value is limited to 16 digits, with the precision limited to 4 digits. Any meter reading values that exceed the precision of 4 digits will be rounded and result in a loss of precision.

The input also accepts scientific notation formats such as "2.5E+8". These values are constrained by the limitations above.



## OpenAPI

````yaml /tango_watchwire/integrations/guides/watchwire-api.yaml post /custommeters/{customMeterId}/meterreadings
openapi: 3.1.0
info:
  title: WatchWire API
  version: 1.0.0
  description: >-
    The WatchWire Platform has APIs that allow you to access your data
    programmatically. There are several APIs designed for the modules in the
    WatchWire platform including - Invoice Data, Real-Time, Accounts Payable,
    and Measurement & Verification. All are highly scalable, and secure APIs
    that communicate over HTTPS RESTful protocols with JSON based documents.


    > **Note**: Not all WatchWire modules are available as an API.


    # Authentication


    You need credentials to access the APIs - it is the same credentials as your
    WatchWire login. The `/authenticate` will return a Token that needs to be
    included in the header of every subsequent request. The token renews with
    each request and expires after 60 minutes of inactivity (at which point you
    will need to re-authenticate and get a new token).


    > Please contact the WatchWire team for any questions or request for API
    credential access.


    # Error Codes


    There will be various error codes specific to the API you are using, but
    generally follows these principles:


    *   `Unauthorized` - *you are unauthenticated or unauthorized to request
    actions on an asset*

    *   `Asset doesn't exist` - *the item you are querying for doesn't exist*

    *   `Server error`\- *general exception raised in our application code*
        

    # Rate limit


    Rate limited to 10 transactions per meter / second
servers:
  - url: https://auth.replace-me.example.com
    description: Authentication service (Postman variable {{ww-api-baseurl}})
  - url: https://realtime.replace-me.example.com
    description: RealTime API (Postman variable {{gateway-realtime-api}})
  - url: https://ap.replace-me.example.com
    description: Accounts Payable API (Postman variable {{gateway-ap-api}})
  - url: https://invoice.replace-me.example.com
    description: Invoice API (Postman variable {{portal-api-baseurl}})
  - url: https://mv.replace-me.example.com
    description: Measurement & Verification API (Postman variable {{invoice-api}})
security:
  - BearerAuth: []
tags:
  - name: Authentication
  - name: RealTime API - Custom Meter
  - name: RealTime API - Meter Readings
  - name: RealTime API - Meter Readings Aggregations
  - name: RealTime API - Meter Readings Batch Operations
  - name: RealTime API - Obvius Meter Readings
  - name: Accounts Payable API - Audit Statements
  - name: Accounts Payable API - Nexus Statements
  - name: Accounts Payable API - Standard Statements
  - name: Accounts Payable API - Statement PDFs
  - name: Invoice API - Reference IDs
  - name: Invoice API - Invoice
  - name: Measurement & Verification API - M&V
paths:
  /custommeters/{customMeterId}/meterreadings:
    post:
      tags:
        - RealTime API - Meter Readings
      summary: Add Readings For Custom Meter
      description: >-
        A `POST` request will create a meter reading for the custom meter with a
        matching identifier.


        > A constraint violation error will occur if a custom meter has an
        existing meter reading for a given timestamp.


        ##### Timestamp Format


        The timestamp must be in the ISO 8601 standard format. The following are
        examples of supported formats:


        | Format | Example |

        | --- | --- |

        | YYYY-MM-DDTHH:mm:ss.SSSZ | 2020-01-03T09:07:21.215Z |

        | YYYY-MM-DDTHH:mm:ss.SSZ | 2020-01-03T09:07:21.21Z |

        | YYYY-MM-DDTHH:mm:ss.SZ | 2020-01-03T09:07:21.2Z |

        | YYYY-MM-DDTHH:mm:ss.SSS | 2020-01-03T09:07:21.215 |

        | YYYY-MM-DDTHH:mm:ss.SS | 2020-01-03T09:07:21.21 |

        | YYYY-MM-DDTHH:mm:ssZ | 2020-01-03T09:07:21Z |

        | YYYY-MM-DDTHH:mm:ss | 2020-01-03T09:07:21 |

        | YYYY-MM-DDTHH:mmZ | 2020-01-03T09:07Z |

        | YYYY-MM-DDTHH:mm | 2020-01-03T09:07 |


        ##### Meter Reading Value Format


        The maximum allowed scale for a meter reading value is limited to 16
        digits, with the precision limited to 4 digits. Any meter reading values
        that exceed the precision of 4 digits will be rounded and result in a
        loss of precision.


        The input also accepts scientific notation formats such as "2.5E+8".
        These values are constrained by the limitations above.
      operationId: addReadingsForCustomMeter
      parameters:
        - name: customMeterId
          in: path
          required: true
          schema:
            type: integer
          description: Unique identifier of the custom meter.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                timestamp:
                  type: string
                value:
                  type: integer
            example:
              timestamp: 2020-01-02T19:00:00.000+0000
              value: 5
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthorized - missing, invalid or expired token
      security:
        - BearerAuth: []
      servers:
        - url: https://realtime.replace-me.example.com
          description: RealTime API (Postman variable {{gateway-realtime-api}})
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Token returned by `POST /authenticate`. Expires after 60 minutes of
        inactivity.

````