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

# Declare Partnership Data 🇫🇷

Create declaration on a partner company for billing. (Only for partners)
\
**Required scopes**: None

# 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}/billing-declarations": {
      "post": {
        "operationId": "POST_partner_declarations",
        "summary": "Declare Partnership Data 🇫🇷",
        "description": "Create declaration on a partner company for billing. (Only for partners)\n\\\n**Required scopes**: None",
        "tags": [
          "Partners only"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "companyId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The id of the company"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "monthOfApplication": {
                        "type": "string",
                        "pattern": "^2\\d{3}(0[1-9]|1[0-2])$",
                        "description": "The month of declaration application. This must be in the format YYYYMM, January being the month \"01\".",
                        "example": 202212
                      }
                    },
                    "required": [
                      "monthOfApplication"
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "quantityByProducts": {
                            "type": "array",
                            "description": "Quantity for each product.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "productName": {
                                  "type": "string",
                                  "description": "The product name.",
                                  "example": "meal-vouchers"
                                },
                                "quantity": {
                                  "type": "number",
                                  "description": "The quantity of this product. This can be a number of employees, a MRR, a number of meals vouchers, etc.",
                                  "example": 1000
                                }
                              },
                              "required": [
                                "productName",
                                "quantity"
                              ]
                            },
                            "required": [
                              "quantityByProducts"
                            ],
                            "example": [
                              {
                                "productName": "meal-vouchers",
                                "quantity": 10
                              },
                              {
                                "productName": "health-insurance",
                                "quantity": 5
                              }
                            ]
                          }
                        }
                      },
                      {
                        "type": "object",
                        "description": "Deprecated, use quantityByProducts instead",
                        "properties": {
                          "employeesByProducts": {
                            "type": "array",
                            "description": "Number of employees in the company per product.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "productName": {
                                  "type": "string",
                                  "description": "The product name.",
                                  "example": "meal-vouchers"
                                },
                                "numberOfEmployees": {
                                  "type": "integer",
                                  "description": "The number of employees for this product.",
                                  "example": 10
                                }
                              },
                              "required": [
                                "productName",
                                "numberOfEmployees"
                              ]
                            },
                            "required": [
                              "employeesByProducts"
                            ],
                            "example": [
                              {
                                "productName": "meal-vouchers",
                                "numberOfEmployees": 10
                              },
                              {
                                "productName": "health-insurance",
                                "numberOfEmployees": 5
                              }
                            ]
                          }
                        }
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The declaration was correctly created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "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": []
          }
        ]
      }
    }
  },
  "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": "Partners only"
    }
  ]
}
```