@@ -8222,7 +8222,107 @@ paths:
82228222 $ref: "#/components/responses/Unauthenticated"
82238223 "500":
82248224 $ref: "#/components/responses/UnexpectedError"
8225-
8225+
8226+ /organizations/{organization_id}/series-group/default-series:
8227+ put:
8228+ operationId: updateDefaultSeries
8229+ tags:
8230+ - organization
8231+ summary: Establecer serie predeterminada
8232+ description: |
8233+ Asigna una serie predeterminada para el tipo de comprobante indicado.
8234+ x-codeSamples:
8235+ - lang: Bash
8236+ label: cURL
8237+ source: |
8238+ curl https://www.facturapi.io/v2/organizations/5a2a307be93a2f00129ea035/series-group/default-series \
8239+ -X PUT \
8240+ -H "Authorization: Bearer sk_user_API_KEY" \
8241+ -H "Content-Type: application/json" \
8242+ -d '{
8243+ "type": "I",
8244+ "series": "A"
8245+ }'
8246+ - lang: JavaScript
8247+ label: Node.js
8248+ source: |
8249+ import Facturapi from 'facturapi'
8250+ const facturapi = new Facturapi('sk_user_API_KEY');
8251+
8252+ const result = await facturapi.organizations.updateDefaultSeries(
8253+ '5a2a307be93a2f00129ea035',
8254+ {
8255+ type: 'I',
8256+ series: 'A'
8257+ }
8258+ );
8259+ - lang: csharp
8260+ label: C#
8261+ source: |
8262+ var facturapi = new FacturapiClient("sk_user_API_KEY");
8263+ var result = await facturapi.Organization.UpdateDefaultSeriesAsync(
8264+ "5a2a307be93a2f00129ea035",
8265+ new Dictionary<string, object>
8266+ {
8267+ ["type"] = "I",
8268+ ["series"] = "A"
8269+ }
8270+ );
8271+ - lang: Java
8272+ label: Java
8273+ source: |
8274+ import io.facturapi.Facturapi;
8275+ import java.util.List;
8276+ import java.util.Map;
8277+
8278+ Facturapi facturapi = new Facturapi("sk_test_API_KEY");
8279+
8280+ var response = facturapi.organizations().updateDefaultSeries(
8281+ "org_123",
8282+ Map.of(
8283+ "type", "I",
8284+ "series", "A"
8285+ )
8286+ );
8287+ - lang: PHP
8288+ source: |
8289+ $facturapi = new Facturapi("sk_user_API_KEY");
8290+ $result = $facturapi->Organizations->updateDefaultSeries(
8291+ "5a2a307be93a2f00129ea035",
8292+ [
8293+ "type" => "I",
8294+ "series" => "A"
8295+ ]
8296+ );
8297+ requestBody:
8298+ $ref: "#/components/requestBodies/OrganizationSeriesDefault"
8299+ parameters:
8300+ - in: path
8301+ name: organization_id
8302+ schema:
8303+ type: string
8304+ required: true
8305+ description: ID de la organización
8306+ security:
8307+ - "SecretLiveKey": []
8308+ - "SecretTestKey": []
8309+ - "SecretUserKey": []
8310+ responses:
8311+ "200":
8312+ description: Serie predeterminada actualizada
8313+ content:
8314+ application/json:
8315+ schema:
8316+ $ref: "#/components/schemas/OkResponse"
8317+ "400":
8318+ $ref: "#/components/responses/BadRequest"
8319+ "401":
8320+ $ref: "#/components/responses/Unauthenticated"
8321+ "404":
8322+ $ref: "#/components/responses/NotFound"
8323+ "500":
8324+ $ref: "#/components/responses/UnexpectedError"
8325+
82268326 /organizations/{organization_id}/series-group/{series_name}:
82278327 put:
82288328 operationId: updateSeriesGroup
@@ -10709,6 +10809,11 @@ components:
1070910809 application/json:
1071010810 schema:
1071110811 $ref: "#/components/schemas/OrganizationSeriesUpdateInput"
10812+ OrganizationSeriesDefault:
10813+ content:
10814+ application/json:
10815+ schema:
10816+ $ref: "#/components/schemas/OrganizationSeriesDefaultInput"
1071210817 OrganizationInviteCreate:
1071310818 required: true
1071410819 content:
@@ -16205,6 +16310,28 @@ components:
1620516310 next_folio_test:
1620616311 type: integer
1620716312 description: Número de folio que se asignará a la siguiente factura en ambiente Test (y que se incrementará automáticamente por cada nueva factura).
16313+ OrganizationSeriesDefaultInput:
16314+ type: object
16315+ required:
16316+ - type
16317+ - series
16318+ properties:
16319+ type:
16320+ type: string
16321+ enum:
16322+ - I
16323+ - E
16324+ - P
16325+ - N
16326+ - T
16327+ description: |
16328+ Tipo de comprobante. Valores posibles:
16329+ `I` (Ingreso), `E` (Egreso), `P` (Pago), `N` (Nómina), `T` (Traslado).
16330+ series:
16331+ type: string
16332+ minLength: 1
16333+ maxLength: 25
16334+ description: Nombre de la serie.
1620816335 OrganizationSeriesGroup:
1620916336 title: Objeto Series
1621016337 type: object
0 commit comments