# Create Compensation Types. Creates a new Compensation Type and returns the created resource with its UUID. This UUID can be used to create a new compensation. The types include one-time and recurring Compensation Types for salary workers. Hourly types are not supported and bonuses should use recurring or one time types. # OpenAPI definition ```json { "openapi": "3.0.3", "info": { "title": "Payroll Integrations API", "description": "Collection of endpoints that will allow external companies to integrate Payroll providers with Personio's.", "version": "2.0.0" }, "servers": [ { "url": "https://api.personio.de" } ], "security": [ { "BearerAuth": [] } ], "paths": { "/v2/compensations/types": { "post": { "summary": "Create Compensation Types.", "tags": [ "Compensations" ], "description": "Creates a new Compensation Type and returns the created resource with its UUID. This UUID can be used to create a new compensation. The types include one-time and recurring Compensation Types for salary workers. Hourly types are not supported and bonuses should use recurring or one time types.\n", "x-path-examples": { "Success - Create Value Compensation": { "$ref": "#/components/examples/CreateCompensationTypeRequest" }, "Bad request - Payload contains null values": { "$ref": "#/components/examples/CreateCompensationTypeRequiredParamsMissingRequest" }, "Bad request - Payload contains invalid type values": { "$ref": "#/components/examples/CreateCompensationTypeInvalidFrequencyRequest" } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCompensationType" }, "examples": { "Success - Create Value Compensation": { "$ref": "#/components/examples/CreateCompensationTypeRequest" } } } } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CompensationType" }, { "type": "object", "properties": { "_meta": { "$ref": "#/paths/~1v2~1compensations/get/responses/200/content/application~1json/schema/properties/_meta" } } } ] }, "examples": { "Success - Create Value Compensation": { "$ref": "#/components/examples/CreateCompensationTypeResponse" } } } } }, "400": { "description": "The current request is invalid. Please make sure you pass all the required parameters and you are using the proper content-type.", "content": { "application/problem+json": { "schema": { "$ref": "#/paths/~1v2~1compensations/get/responses/400/content/application~1problem%2Bjson/schema" }, "examples": { "Bad request - Payload contains null values": { "$ref": "#/components/examples/CreateCompensationTypeRequiredParamsMissingResponse" }, "Bad request - Payload contains invalid type values": { "$ref": "#/components/examples/CreateCompensationTypeInvalidFieldResponse" } } } } } } } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }, "schemas": { "CompensationType": { "description": "Compensation Type schema.", "type": "object", "required": [ "id", "name", "category" ], "properties": { "id": { "type": "string", "description": "UUID of the Compensation Type." }, "name": { "type": "string", "description": "Name given to the Compensation Type." }, "category": { "type": "string", "enum": [ "FIXED_SALARY", "HOURLY_SALARY", "RECURRING", "ONE_TIME" ], "description": "Payout frequency of the compensations of this type. FIXED_SALARY is the usual monthly or yearly salary. HOURLY_SALARY is the rate of the hour. ONE_TIME or RECURRING are bonuses and extra payments." } } }, "CreateCompensationType": { "description": "Compensation Type creation schema payload.", "type": "object", "required": [ "name", "category" ], "properties": { "name": { "type": "string", "description": "Name of the Compensation Type.", "example": "Gym benefit" }, "category": { "type": "string", "enum": [ "RECURRING", "ONE_TIME" ], "description": "Payout frequency of the compensations of this type. ONE_TIME or RECURRING are bonuses and extra payments." } } } }, "examples": { "CreateCompensationTypeRequest": { "value": { "name": "Public Transport", "category": "RECURRING" } }, "CreateCompensationTypeResponse": { "value": { "id": "de49b0e6-c151-45f1-9211-34ff7dcb9e0a", "name": "Public Transport", "category": "RECURRING", "_meta": { "links": { "self": { "href": "https://api.personio.de/v2/compensations/types" } } } } }, "CreateCompensationTypeRequiredParamsMissingRequest": { "value": { "name": "Public Transport without type", "category": null } }, "CreateCompensationTypeRequiredParamsMissingResponse": { "value": { "personio_trace_id": "baaaaaad-c0de-fade-baad-c000000000de", "timestamp": "2023-03-01T14:07:17Z", "errors": [ { "title": "Bad Request", "detail": "The request has missing or invalid required parameters.", "type": "https://developer.personio.de/v2.0/page/public-api-error-codes#compensations.invalid_request.required_parameters_missing" } ] } }, "CreateCompensationTypeInvalidFrequencyRequest": { "value": { "name": "Public Transport with invalid type", "category": "BONUS" } }, "CreateCompensationTypeInvalidFieldResponse": { "value": { "personio_trace_id": "baaaaaad-c0de-fade-baad-c000000000de", "timestamp": "2023-03-01T14:07:17Z", "errors": [ { "title": "Bad Request", "detail": "The request has invalid parameters.", "type": "https://developer.personio.de/v2.0/page/public-api-error-codes#compensations.invalid_request.parameters_invalid" } ] } } } } } ```