---
updatedAt: 2026-06-29T09:41:37.000Z
agentTools:
  projectIndex: https://developers.payfit.io/llms.txt
---

# Get accounting v2 data 🇫🇷

Only available for FR. Returns accounting data of the company for a given month. For French companies, the data returned is the same than the one in the automatic accounting exports, so the company accounting exports have to be configured properly in order to get details by analytical code, and by employee.

\
**Required scopes**: *accounting:read*

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Partner API",
    "description": "An API to let third parties communicate with PayFit",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://partner-api.payfit.com",
      "description": "The PayFit API production server"
    }
  ],
  "paths": {
    "/companies/{companyId}/accounting-v2": {
      "get": {
        "operationId": "GET_companyAccountingV2",
        "summary": "Get accounting v2 data 🇫🇷",
        "description": "Only available for FR. Returns accounting data of the company for a given month. For French companies, the data returned is the same than the one in the automatic accounting exports, so the company accounting exports have to be configured properly in order to get details by analytical code, and by employee.\n\n\\\n**Required scopes**: *accounting:read*",
        "tags": [
          "Company"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "companyId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The id of the company"
          },
          {
            "in": "query",
            "name": "date",
            "schema": {
              "type": "string",
              "pattern": "^2\\d{3}(0[1-9]|1[0-2])$"
            },
            "required": true,
            "description": "The month to fetch the data for. This must be in the format YYYYMM, January being the month \"01\".",
            "example": 202212
          }
        ],
        "responses": {
          "200": {
            "description": "The accounting JSON of the company for a given month",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "accounting-v2",
                    "type": "object",
                    "properties": {
                      "operationDate": {
                        "type": "string",
                        "format": "date",
                        "description": "Date of the accounting entry."
                      },
                      "analyticCodes": {
                        "type": "array",
                        "description": "Composition of all sections the collaborator belongs to in Payfit analytical accounting settings.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "The type of analytic based on accounting settings (ex: Team).",
                              "nullable": true
                            },
                            "code": {
                              "type": "string",
                              "description": "The code of analytic based on accounting settings (ex: 6312000).",
                              "nullable": true
                            },
                            "value": {
                              "type": "string",
                              "description": "The value of analytic based on accounting settings (ex: Sales).",
                              "nullable": true
                            }
                          },
                          "required": [
                            "type",
                            "code",
                            "value"
                          ]
                        }
                      },
                      "employeeFullName": {
                        "type": "string",
                        "description": "The Fullname of the concerned employee.",
                        "nullable": true
                      },
                      "contractId": {
                        "type": "string",
                        "description": "The contractId of the employee entry.",
                        "nullable": true
                      },
                      "accountId": {
                        "type": "string",
                        "description": "Refers to an account's unique numerical identifier in an accounting system."
                      },
                      "accountName": {
                        "type": "string",
                        "description": "Label of the accounting entry."
                      },
                      "debit": {
                        "type": "number",
                        "description": "Amount of the debit operation.",
                        "nullable": true
                      },
                      "credit": {
                        "type": "number",
                        "description": "Amount of the credit operation.",
                        "nullable": true
                      }
                    },
                    "required": [
                      "operationDate",
                      "analyticCodes",
                      "employeeFullName",
                      "contractId",
                      "accountId",
                      "accountName",
                      "debit",
                      "credit"
                    ]
                  }
                },
                "example": [
                  {
                    "operationDate": "2020-01-31",
                    "analyticCodes": [
                      {
                        "type": "Team",
                        "value": "Sales Jetlang",
                        "code": "SalesJetlang"
                      },
                      {
                        "type": "Office",
                        "value": "paris",
                        "code": "paris"
                      },
                      {
                        "type": "Departement",
                        "value": null,
                        "code": null
                      }
                    ],
                    "employeeFullName": "Alice Adam",
                    "contractId": "5dd272fd1cdb18010090e32d",
                    "accountId": "6411000",
                    "accountName": "Salaires, appointements",
                    "debit": 4500,
                    "credit": null
                  },
                  {
                    "operationDate": "2020-01-31",
                    "analyticCodes": [
                      {
                        "type": "Team",
                        "value": "Sales Jetlang",
                        "code": "SalesJetlang"
                      },
                      {
                        "type": "Office",
                        "value": "paris",
                        "code": "paris"
                      },
                      {
                        "type": "Departement",
                        "value": null,
                        "code": null
                      }
                    ],
                    "employeeFullName": "Alice Adam",
                    "contractId": "5dd272fd1cdb18010090e32d",
                    "accountId": "6411001",
                    "accountName": "Autres elements du brut",
                    "debit": 44.51,
                    "credit": null
                  },
                  {
                    "operationDate": "2020-01-31",
                    "analyticCodes": [
                      {
                        "type": "Team",
                        "value": "Sales Jetlang",
                        "code": "SalesJetlang"
                      },
                      {
                        "type": "Office",
                        "value": "paris",
                        "code": "paris"
                      },
                      {
                        "type": "Departement",
                        "value": null,
                        "code": null
                      }
                    ],
                    "employeeFullName": "Alice Adam",
                    "contractId": "5dd272fd1cdb18010090e32d",
                    "accountId": "6413000",
                    "accountName": "Primes et gratifications",
                    "debit": 724,
                    "credit": null
                  },
                  {
                    "operationDate": "2020-01-31",
                    "analyticCodes": [
                      {
                        "type": "Team",
                        "value": "Sales Jetlang",
                        "code": "SalesJetlang"
                      },
                      {
                        "type": "Office",
                        "value": "paris",
                        "code": "paris"
                      },
                      {
                        "type": "Departement",
                        "value": null,
                        "code": null
                      }
                    ],
                    "employeeFullName": "Alice Adam",
                    "contractId": "5dd272fd1cdb18010090e32d",
                    "accountId": "6414000",
                    "accountName": "Indemnites et avantages divers",
                    "debit": 37.6,
                    "credit": null
                  },
                  {
                    "operationDate": "2020-01-31",
                    "analyticCodes": [
                      {
                        "type": "Team",
                        "value": "Sales Jetlang",
                        "code": "SalesJetlang"
                      },
                      {
                        "type": "Office",
                        "value": "paris",
                        "code": "paris"
                      },
                      {
                        "type": "Departement",
                        "value": null,
                        "code": null
                      }
                    ],
                    "employeeFullName": "Alice Adam",
                    "contractId": "5dd272fd1cdb18010090e32d",
                    "accountId": "6417000",
                    "accountName": "Avantages en nature",
                    "debit": 78,
                    "credit": null
                  },
                  {
                    "operationDate": "2020-01-31",
                    "analyticCodes": [
                      {
                        "type": "Team",
                        "value": "Sales Jetlang",
                        "code": "SalesJetlang"
                      },
                      {
                        "type": "Office",
                        "value": "paris",
                        "code": "paris"
                      },
                      {
                        "type": "Departement",
                        "value": null,
                        "code": null
                      }
                    ],
                    "employeeFullName": "Alice Adam",
                    "contractId": "5dd272fd1cdb18010090e32d",
                    "accountId": "4210000",
                    "accountName": "Personnel - remunerations dues",
                    "debit": null,
                    "credit": 3753.78
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "title": "error",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A human readable error"
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "string",
                          "additionalProperties": true
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "error": {
                    "summary": "An example of an error message",
                    "value": {
                      "code": 400,
                      "error": "Bad request",
                      "details": "Field \"id\" is required."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "title": "error",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A human readable error"
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "string",
                          "additionalProperties": true
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "error": {
                    "summary": "An example of an error message",
                    "value": {
                      "code": 401,
                      "error": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "title": "error",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A human readable error"
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "string",
                          "additionalProperties": true
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "error": {
                    "summary": "An example of an error message",
                    "value": {
                      "code": 403,
                      "error": "Forbidden action",
                      "details": "Missing scope \"contracts:read\"."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "title": "error",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A human readable error"
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "string",
                          "additionalProperties": true
                        }
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "examples": {
                  "error": {
                    "summary": "An example of an error message",
                    "value": {
                      "code": 404,
                      "error": "Ressource not found",
                      "details": "The provided id is wrong"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "partner-api-oauth": [
              "accounting:read"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "partner-api-oauth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://oauth.payfit.com/authorize",
            "tokenUrl": "https://oauth.payfit.com/token",
            "scopes": {
              "contracts:read": "Allow to read contracts information",
              "collaborators:contracts:write": "Allow to create contracts on a collaborator",
              "contracts:payslips:read": "Allow to read payslips",
              "contracts:time-information:read": "Allow to read time related information of contracts",
              "pension:read": "Allow to read pension documents",
              "collaborators:read": "Read general information of collaborators.",
              "collaborators:write": "Allow to create collaborators.",
              "collaborators:contracts:read": "Read contract information of collaborators.",
              "collaborators:management:read": "Read information about organisation and management.",
              "collaborators:meal-vouchers:read": "Read meal vouchers information of collaborators.",
              "collaborators:personal:read": "Read personal data of collaborators.",
              "collaborators:social-security:read": "Read the social security identifiers of collaborators.",
              "collaborators:legal-identity:read": "Read the legal identity information of collaborators.",
              "collaborators:bank-info:read": "Allow to read the bank info of collaborators.",
              "accounting:read": "Allow to read company accounting information",
              "payment-files:read": "Allow to read company payment file information",
              "time:read": "Allow to read time data",
              "time:write": "Allow to write time data",
              "health-insurance:read": "Allow to read health insurance contracts",
              "health-insurance:write": "Allow to write health insurance contracts"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Company"
    }
  ]
}
```