diff --git a/.github/workflows/markdown-naming-check.yml b/.github/workflows/markdown-naming-check.yml index 9e17fe9..dd117e7 100644 --- a/.github/workflows/markdown-naming-check.yml +++ b/.github/workflows/markdown-naming-check.yml @@ -1,6 +1,5 @@ name: Markdown Naming Convention Check -# Trigger the workflow on push and pull request events on: push: branches: @@ -28,12 +27,11 @@ jobs: runs-on: ubuntu-latest steps: - # Checkout the repository code - name: Checkout repository uses: actions/checkout@v4 with: # Fetch full history for better file analysis - fetch-depth: 0 + fetch-depth: 0 # Set up Python environment - name: Set up Python @@ -42,32 +40,23 @@ jobs: python-version: '3.9' cache: 'pip' - # Install dependencies (if any are added in the future) + # Install dependencies - name: Install dependencies run: | python -m pip install --upgrade pip - # Add any future dependencies here - # pip install -r requirements.txt - shell: bash - + pip install python-frontmatter PyYAML + # Make the validation script executable - name: Make script executable run: chmod +x scripts/markdown-naming-check.py shell: bash - + # Run the markdown naming validation - name: Run markdown naming validation - id: validation + id: validate run: | echo "Starting markdown file naming validation..." - # Check if markdownpages directory exists - if [ -d "markdownpages" ]; then - python scripts/markdown-naming-check.py --root-path markdownpages - else - echo "No markdownpages directory found!" - exit 1 - fi - shell: bash + python scripts/markdown-naming-check.py --root-path markdownpages continue-on-error: true # Generate detailed report for PR comments (if needed) @@ -79,7 +68,7 @@ jobs: # Run the validation and capture both exit code and output set +e # Temporarily disable exit on error - + # Check which directory exists and run validation accordingly if [ -d "markdownpages" ]; then python scripts/markdown-naming-check.py --root-path markdownpages --json > validation-report.json @@ -87,10 +76,10 @@ jobs: echo '{"error": "No markdownpages directory found", "success": false, "total_files_checked": 0, "violations_found": 0, "violations": []}' > validation-report.json validation_exit_code=1 fi - + validation_exit_code=$? set -e # Re-enable exit on error - + # Check if there are violations based on exit code if [ $validation_exit_code -eq 0 ]; then echo "validation_status=success" >> $GITHUB_OUTPUT @@ -105,7 +94,7 @@ jobs: echo "\`\`\`" >> $GITHUB_STEP_SUMMARY fi shell: bash - + # Upload validation report as artifact - name: Upload validation report if: always() @@ -169,4 +158,4 @@ jobs: else echo "- **Status:** ❌ Validation report not found" >> $GITHUB_STEP_SUMMARY fi - shell: bash \ No newline at end of file + shell: bash diff --git a/API-Documentation.code-workspace b/API-Documentation.code-workspace new file mode 100644 index 0000000..623fa80 --- /dev/null +++ b/API-Documentation.code-workspace @@ -0,0 +1,13 @@ +{ + "folders": [ + { + "name": "API-Documentation", + "path": "../API-Documentation" + }, + { + "name": "OASContent", + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git a/markdownpages/profit/en/app-connector-auditor-afas.md b/markdownpages/profit/en/app-connector-auditor-afas.md index 5623f08..fe37ce7 100644 --- a/markdownpages/profit/en/app-connector-auditor-afas.md +++ b/markdownpages/profit/en/app-connector-auditor-afas.md @@ -1,9 +1,9 @@ --- -title: Partner Integration Self Service for AFAS employees author: Eric Zwaal -date: 2025-09-06 -tags: Appconnector, setup, GetConnector +date: 2025-11-08 index: false +tags: Partner, Integration, Hr +title: Partner Integration Self Service for AFAS employees --- -Dit bestand is niet beschikbaar in het Engels. Lees de [Nederlandse versie](../nl/app-connector-auditor-afas). +Dit bestand is niet beschikbaar in het Engels. Lees de [Nederlandse versie](../nl/app-connector-auditor-afas). \ No newline at end of file diff --git a/markdownpages/profit/en/app-connector-auditor-partner.md b/markdownpages/profit/en/app-connector-auditor-partner.md index f43733f..8732eec 100644 --- a/markdownpages/profit/en/app-connector-auditor-partner.md +++ b/markdownpages/profit/en/app-connector-auditor-partner.md @@ -1,9 +1,9 @@ --- -title: AppConnector Auditor for Partners author: Eric Zwaal -date: 2025-09-16 -tags: Appconnector, setup, GetConnector +date: 2025-11-08 index: true +tags: Partner, IntegrationId, Tutorial, GetConnector, UpdateConnector, Profit5 +title: AppConnector Auditor for Partners --- *this file is an AI-translated version of the [Dutch document](../nl/app-connector-auditor-afas) and may contain errors.* @@ -310,4 +310,4 @@ Do you have questions, comments, bug reports, suggestions for improvement, compl ###### Don't have a login? -One or more of your colleagues are administrators on the customer portal and can add you as a contact, so you can log in yourself. +One or more of your colleagues are administrators on the customer portal and can add you as a contact, so you can log in yourself. \ No newline at end of file diff --git a/markdownpages/profit/en/app-connector-auditor.md b/markdownpages/profit/en/app-connector-auditor.md index 0f789ff..93337a3 100644 --- a/markdownpages/profit/en/app-connector-auditor.md +++ b/markdownpages/profit/en/app-connector-auditor.md @@ -1,9 +1,9 @@ --- -title: AppConnector Auditor author: Eric Zwaal -date: 2025-09-16 -tags: Appconnector, setup, GetConnector, authorization +date: 2025-11-08 index: true +tags: Partner, GetConnector, UpdateConnector, AppConnector, Integration, Configuration +title: AppConnector Auditor --- *this document is an AI-translated version of the [Dutch documentation](../nl/app-connector-auditor) and may contain errors.* @@ -178,5 +178,4 @@ See [above](#there-are-getconnectors-with-more-than-10-joins). This GetConnector #### This GetConnector retrieves data from tables more than 5 levels deep -See [above](#there-are-getconnectors-that-retrieve-data-more-than-5-levels-deep). This GetConnector may be optimized if you experience performance issues with the integration. - +See [above](#there-are-getconnectors-that-retrieve-data-more-than-5-levels-deep). This GetConnector may be optimized if you experience performance issues with the integration. \ No newline at end of file diff --git a/markdownpages/profit/en/authentication.md b/markdownpages/profit/en/authentication.md index cbba63b..810be2e 100644 --- a/markdownpages/profit/en/authentication.md +++ b/markdownpages/profit/en/authentication.md @@ -1,8 +1,8 @@ --- -title: Authentication author: CLN -date: 2024-06-28 -tags: tokens, jwt, bearer, oauth, access +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, AppConnector, Integration, Configuration +title: Authentication --- ## Introduction diff --git a/markdownpages/profit/en/concepts.md b/markdownpages/profit/en/concepts.md index 06f9662..de76a31 100644 --- a/markdownpages/profit/en/concepts.md +++ b/markdownpages/profit/en/concepts.md @@ -1,9 +1,10 @@ --- -title: Concepts author: CLN -date: 2024-05-28 -tags: Appconnector, GetConnector, UpdateConnector +date: 2025-11-08 +tags: GetConnector, UpdateConnector, AppConnector, Configuration, Authentication, Authorization +title: Concepts --- + ## App Connector The App Connector is the component in AFAS Profit through which you can integrate your App. The AFAS administrator sets it up in several steps. The App Connectors authorize GetConnectors and UpdateConnectors, and the administrator creates the token here. Profit administrators can add an unlimited number of App Connectors. @@ -63,4 +64,4 @@ This environment is the first environment to receive an update for a new AFAS Pr ### Read more -- [Profit API Authentication](./authentication) +- [Profit API Authentication](./authentication) \ No newline at end of file diff --git a/markdownpages/profit/en/custom-fields.md b/markdownpages/profit/en/custom-fields.md index 026470d..c1735dd 100644 --- a/markdownpages/profit/en/custom-fields.md +++ b/markdownpages/profit/en/custom-fields.md @@ -1,8 +1,8 @@ --- -title: Custom Fields author: CLN -date: 2024-05-28 -tags: custom, customfields, custom fields, guids +date: 2025-11-08 +tags: GetConnector, UpdateConnector, Configuration +title: Custom Fields --- AFAS administrators can add custom fields (vrije velden) to most tables in Profit. These custom fields will then become available in the endpoints. @@ -73,4 +73,4 @@ curl -X PUT "https://12345.rest.afas.online/ProfitRestServices/connectors/KnPers AFAS administrators have the option to add custom fields in the environment. - [Configuration](https://help.afas.nl/help/NL/SE/App_UDF_Field_Add.htm) -- [Exchange between environments](https://help.afas.nl/help/NL/SE/App_UDF_ExpImp.htm) +- [Exchange between environments](https://help.afas.nl/help/NL/SE/App_UDF_ExpImp.htm) \ No newline at end of file diff --git a/markdownpages/profit/en/get-connector-geblokkeerd.md b/markdownpages/profit/en/get-connector-geblokkeerd.md index 500e6f6..00865ee 100644 --- a/markdownpages/profit/en/get-connector-geblokkeerd.md +++ b/markdownpages/profit/en/get-connector-geblokkeerd.md @@ -1,9 +1,10 @@ --- -title: GetConnector blocked author: EZW -date: 2024-07-22 -tags: GetConnector, troubleshoot +date: 2025-11-08 +tags: GetConnector, Integration, Crm +title: GetConnector blocked --- + Have you received a message that a GetConnector in your environment has been blocked? Then this article is for you. AFAS maintains a Fair Use policy for API usage. In practice, this means that every day the 10 heaviest users receive a message that they need to adjust their process. @@ -24,4 +25,4 @@ A GetConnector is always called by another process; this is often an external ap ## Unblock the GetConnector Once the problem is solved, you can unblock the GetConnector. You unblock a GetConnector via the following path: **General / Output / Management / GetConnector**. Then choose the action **Definition**. With this action you open the properties of the GetConnector. You uncheck the **Blocked** field. Are the blocked rows not visible in the view? Then click the gear wheel at the top right and click **Show blocked rows**. -*source: https://help.afas.nl/meldingen/NL/SE/99797.htm* +*source: https://help.afas.nl/meldingen/NL/SE/99797.htm* \ No newline at end of file diff --git a/markdownpages/profit/en/get-connector.md b/markdownpages/profit/en/get-connector.md index d186da1..48a1522 100644 --- a/markdownpages/profit/en/get-connector.md +++ b/markdownpages/profit/en/get-connector.md @@ -1,8 +1,8 @@ --- -title: GetConnector author: CLN -date: 2024-12-17 -tags: get, data, sorting +date: 2025-11-08 +tags: GetConnector, AppConnector, Integration, Authorization, Hr, Order Management +title: GetConnector --- A GetConnector is an endpoint that allows an application to retrieve records from the Profit database. An AFAS administrator can compose these GetConnector definitions themselves, determining the records and fields that can be retrieved. @@ -273,4 +273,4 @@ Response: ## Rowcount on GetConnector -To get a rowcount on a GetConnector, you need to create a copy of the existing GetConnector. Based on this, you can add an aggregation on the key and make the other fields invisible. Request the AFAS administrator to carry this out. [Functional description](https://help.afas.nl/help/NL/SE/App_Query_Cond.htm) +To get a rowcount on a GetConnector, you need to create a copy of the existing GetConnector. Based on this, you can add an aggregation on the key and make the other fields invisible. Request the AFAS administrator to carry this out. [Functional description](https://help.afas.nl/help/NL/SE/App_Query_Cond.htm) \ No newline at end of file diff --git a/markdownpages/profit/en/howto-ats.md b/markdownpages/profit/en/howto-ats.md index 48e61ca..2ae9f44 100644 --- a/markdownpages/profit/en/howto-ats.md +++ b/markdownpages/profit/en/howto-ats.md @@ -1,8 +1,8 @@ --- -title: Onboarding a new candidate author: EZW -date: 2025-09-02 -tags: candidate, flex, front, back, office +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Profit4, Configuration, Authorization +title: Onboarding a new candidate --- ## Introduction @@ -294,4 +294,4 @@ The field `VcSn` / Vacancy sequence number must match the vacancy being applied } ``` -The call to `HrCreateApplicant` creates a dossier item of the type "Application" (code -44). For this dossier item, the `CaId` value from the previous response is used for the destination `Create application`. Use that information to retrieve the number of the dossier item via a custom GetConnector if you need it. +The call to `HrCreateApplicant` creates a dossier item of the type "Application" (code -44). For this dossier item, the `CaId` value from the previous response is used for the destination `Create application`. Use that information to retrieve the number of the dossier item via a custom GetConnector if you need it. \ No newline at end of file diff --git a/markdownpages/profit/en/howto-bijlage-dossier.md b/markdownpages/profit/en/howto-bijlage-dossier.md index fae8e16..b9b6106 100644 --- a/markdownpages/profit/en/howto-bijlage-dossier.md +++ b/markdownpages/profit/en/howto-bijlage-dossier.md @@ -1,8 +1,8 @@ --- -title: Retrieving attachments from AFAS Profit author: CLN -date: 2024-04-27 -tags: attachment, appendix, pdf, payslip, annual statement +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, AppConnector, Authentication, Authorization +title: Retrieving attachments from AFAS Profit --- ## Introduction @@ -183,4 +183,4 @@ This request contains filters: ### Finally -You have now gone through all the components needed to retrieve attachments from AFAS. If you have a question about this, post it on the forum of [AFAS Connect](https://connect.afas.nl/forum). The community is happy to help you further! +You have now gone through all the components needed to retrieve attachments from AFAS. If you have a question about this, post it on the forum of [AFAS Connect](https://connect.afas.nl/forum). The community is happy to help you further! \ No newline at end of file diff --git a/markdownpages/profit/en/howto-finance-mutation-purch.md b/markdownpages/profit/en/howto-finance-mutation-purch.md index 297c75d..3712907 100644 --- a/markdownpages/profit/en/howto-finance-mutation-purch.md +++ b/markdownpages/profit/en/howto-finance-mutation-purch.md @@ -1,8 +1,8 @@ --- -title: Financial mutations purchasing author: CLN -date: 2024-04-04 -tags: purchasing, confrontation, purchase invoice +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Integration, Authentication, Finance +title: Financial mutations purchasing --- ## Introduction @@ -247,4 +247,4 @@ The last step is to create the confrontation itself. For this you need the `InId "CfSt": "2" } } -``` +``` \ No newline at end of file diff --git a/markdownpages/profit/en/howto-finance-mutation.md b/markdownpages/profit/en/howto-finance-mutation.md index fc097d3..22c1d30 100644 --- a/markdownpages/profit/en/howto-finance-mutation.md +++ b/markdownpages/profit/en/howto-finance-mutation.md @@ -1,8 +1,8 @@ --- -title: Financial mutations basics author: CLN -date: 2024-10-28 -tags: Financial, mutations, accounting +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Integration, Authentication, Finance +title: Financial mutations basics --- ## Introduction @@ -381,4 +381,4 @@ In some situations, you may want to edit the financial invoice, which is automat } } } -} +} \ No newline at end of file diff --git a/markdownpages/profit/en/howto-flex.md b/markdownpages/profit/en/howto-flex.md index 4320437..88f36a4 100644 --- a/markdownpages/profit/en/howto-flex.md +++ b/markdownpages/profit/en/howto-flex.md @@ -1,8 +1,8 @@ --- -title: Sales relation and customer agreement - flex author: CLN -date: 2024-03-04 -tags: sales, customer, agreement, flex +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Configuration, Authorization, Finance +title: Sales relation and customer agreement - flex --- ## Introduction @@ -142,4 +142,4 @@ Example request: } } ``` -a +a \ No newline at end of file diff --git a/markdownpages/profit/en/howto-la-sa.md b/markdownpages/profit/en/howto-la-sa.md index cc7c070..7cdad4c 100644 Binary files a/markdownpages/profit/en/howto-la-sa.md and b/markdownpages/profit/en/howto-la-sa.md differ diff --git a/markdownpages/profit/en/howto-medewerker-ad.md b/markdownpages/profit/en/howto-medewerker-ad.md index 3a12a56..ba30be2 100644 --- a/markdownpages/profit/en/howto-medewerker-ad.md +++ b/markdownpages/profit/en/howto-medewerker-ad.md @@ -1,8 +1,8 @@ --- -title: Employee synchronization with Active Directory author: CLN -date: 2024-03-06 -tags: AD, Active Directory, employee onboarding, employee offboarding +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Authentication, Authorization, Hr +title: Employee synchronization with Active Directory --- ## Introduction diff --git a/markdownpages/profit/en/howto-mobility.md b/markdownpages/profit/en/howto-mobility.md index bd7515e..d2b6770 100644 --- a/markdownpages/profit/en/howto-mobility.md +++ b/markdownpages/profit/en/howto-mobility.md @@ -1,8 +1,8 @@ --- -title: Transport Vehicle for Employee author: CLN -date: 2024-04-04 -tags: car, bicycle, transport, mobility +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Integration, Configuration, Authentication +title: Transport Vehicle for Employee --- ## Introduction @@ -190,4 +190,4 @@ Finally, optionally create a file item with, for example, the lease agreement in } } } -``` +``` \ No newline at end of file diff --git a/markdownpages/profit/en/howto-quickstart.md b/markdownpages/profit/en/howto-quickstart.md index c18c456..d70a3f5 100644 --- a/markdownpages/profit/en/howto-quickstart.md +++ b/markdownpages/profit/en/howto-quickstart.md @@ -1,8 +1,8 @@ --- -title: Quickstart - setup for your first request author: CLN -date: 2024-05-28 -tags: Quickstart, setup, first request, API +date: 2025-11-08 +tags: Partner, Tutorial, GetConnector, Integration, Configuration, Authentication +title: Quickstart - setup for your first request --- This How-To provides you with everything you need to get started with using the AFAS Profit REST API. We guide you through generating your token, finding the request URL, and making your first API call. @@ -261,4 +261,4 @@ func main() { Now that you can successfully authenticate and retrieve data, you are ready to integrate a complete process. Start, for example, with one of these How-To's: -- [Employee AD Sync](./howto-medewerker-ad) +- [Employee AD Sync](./howto-medewerker-ad) \ No newline at end of file diff --git a/markdownpages/profit/en/integrationid.md b/markdownpages/profit/en/integrationid.md index 9a7bff2..93141ca 100644 --- a/markdownpages/profit/en/integrationid.md +++ b/markdownpages/profit/en/integrationid.md @@ -1,8 +1,8 @@ --- -title: AFAS IntegrationId author: CLN -date: 2024-06-27 -tags: +date: 2025-11-08 +tags: Partner, IntegrationId, UpdateConnector, Integration, Authorization, Crm +title: AFAS IntegrationId --- ## What is an IntegrationId @@ -117,4 +117,4 @@ This shows AFAS which integration it is. You can have multiple integrations. - `12345` = your subscription number - `678900` = project number of this integration -This way AFAS can link customers and partners together. The URL contains the customer's subscription number. The IntegrationId contains your subscription number. +This way AFAS can link customers and partners together. The URL contains the customer's subscription number. The IntegrationId contains your subscription number. \ No newline at end of file diff --git a/markdownpages/profit/en/news-api-docs.md b/markdownpages/profit/en/news-api-docs.md index dc250a3..f72d0c0 100644 --- a/markdownpages/profit/en/news-api-docs.md +++ b/markdownpages/profit/en/news-api-docs.md @@ -1,8 +1,8 @@ --- -title: API Docs v2 author: CLN -date: 2024-05-27 -tags: API Docs, integration, documentation +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Profit6, Integration, Authentication +title: API Docs v2 --- Welcome to the latest version of the AFAS API Docs. We are happy that you are using it! With the AFAS API Docs, we want to make it as easy as possible to create great integrations with AFAS products. For this, we have made an extensive API specification with more than 1000 example requests. What are you most happy with? We are very satisfied with all the examples at [KnEmployee](../../apidoc/en/Employee%20and%20contract#post-/connectors/KnEmployee). diff --git a/markdownpages/profit/en/news-profit3.md b/markdownpages/profit/en/news-profit3.md index 3538b55..44a666c 100644 --- a/markdownpages/profit/en/news-profit3.md +++ b/markdownpages/profit/en/news-profit3.md @@ -1,8 +1,8 @@ --- -title: Nieuw in Profit 3 author: CLN -date: 2024-06-17 -tags: Profit3 +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Profit4, Profit3, Configuration +title: Nieuw in Profit 3 --- From Profit 3 onwards, there are a number of changes in the AFAS Profit API. Below are all the changes that have been made. Curious about our roadmap? [Click here](https://www.afas.nl/roadmap) diff --git a/markdownpages/profit/en/news-profit4.md b/markdownpages/profit/en/news-profit4.md index d0a899c..c86cf69 100644 --- a/markdownpages/profit/en/news-profit4.md +++ b/markdownpages/profit/en/news-profit4.md @@ -1,8 +1,8 @@ --- -title: New in Profit 4 author: EZW -date: 2024-10-25 -tags: Profit4 +date: 2025-11-08 +tags: Partner, UpdateConnector, Profit4, Profit3, Integration, Configuration +title: New in Profit 4 --- Starting with Profit 4, a number of changes have been made to the AFAS Profit API. Below are the changes compared to Profit 3. Interested in our roadmap? [Click here](https://www.afas.nl/roadmap) diff --git a/markdownpages/profit/en/news-profit5.md b/markdownpages/profit/en/news-profit5.md index 2eb3b39..da1c04a 100644 --- a/markdownpages/profit/en/news-profit5.md +++ b/markdownpages/profit/en/news-profit5.md @@ -1,8 +1,8 @@ --- -title: New in Profit 5 author: EZW -date: 2024-12-12 -tags: Profit5 +date: 2025-11-08 +tags: UpdateConnector, Profit5, Profit4, Configuration, Hr, Payroll +title: New in Profit 5 --- Starting with Profit 5, a number of changes have been made to the AFAS Profit API. Below are the changes compared to Profit 4. Interested in our roadmap? [Click here](https://www.afas.nl/roadmap) diff --git a/markdownpages/profit/en/news-profit6.md b/markdownpages/profit/en/news-profit6.md index 6fe48c5..6816424 100644 --- a/markdownpages/profit/en/news-profit6.md +++ b/markdownpages/profit/en/news-profit6.md @@ -1,8 +1,8 @@ --- -title: New in Profit 6 author: EZW -date: 2025-06-16 -tags: Profit6 +date: 2025-11-10 +tags: Profit6, GetConnector, UpdateConnector, Configuration, Authentication +title: New in Profit 6 --- Starting with Profit 6, a number of changes have been made to the AFAS Profit API. Below are the changes compared to Profit 5. Interested in our roadmap? [Klik hier](https://www.afas.nl/roadmap) @@ -444,5 +444,4 @@ No changes for this release. | added the new optional request property 'AfasPerson/Element/Objects/AfasEmployee/Element/Fields/EmUs' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | | added the new optional request property 'AfasPerson/Element/Objects/AfasHrApplic' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | | removed the enum value 'KS' of the request property 'AfasPerson/Element/Fields/PsNa' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | -| removed the enum value 'KS' of the request property 'AfasPerson/Element/Objects/AfasIdentityDocument/Element/Fields/ViNa' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | - +| removed the enum value 'KS' of the request property 'AfasPerson/Element/Objects/AfasIdentityDocument/Element/Fields/ViNa' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | \ No newline at end of file diff --git a/markdownpages/profit/en/news-profit7.md b/markdownpages/profit/en/news-profit7.md index ad1c4f6..19109f9 100644 --- a/markdownpages/profit/en/news-profit7.md +++ b/markdownpages/profit/en/news-profit7.md @@ -1,16 +1,13 @@ --- -title: New in Profit 7 author: EZW -date: 2025-11-06 -tags: Profit7 ---- - -**Profit 7 will not be released until November 2025. This document is still in beta and is continuously being updated.** +date: 2025-11-10 +tags: Profit7, GetConnector, UpdateConnector, Integration, Configuration +title: New in Profit 7 --- -Starting with Profit 7, several changes have been implemented in the AFAS Profit API. Below are the changes compared to Profit 6. Curious about our roadmap? [Click here](https://www.afas.nl/roadmap) +Starting with Profit 7, several changes have been implemented in the AFAS Profit API. Below are the changes compared to Profit 6. Curious about our roadmap? [Click here](https://www.afas.nl/roadmap) -> How to read this? Profit has an extensive API with many different components. The API specifications are divided into related sections. Changes are indicated per section. +> How to read this? Profit has an extensive API with many different components. The API specifications are divided into related sections. Changes are indicated per section. ## **Breaking changes** @@ -26,7 +23,7 @@ As already announced in the [new in Profit 6](news-profit6/#afas-token-altijd-ba #### Correct Send the header as `"AfasToken "`: -`-H "Authorization: AfasToken PHRva2VuPjx2ZXJzaW9uPjE8L3ZlcnNpb24+PGRhdGE+MzcyNjk1ODJDOTU5NDNDNEFFNURDQUVFRUY5RjRGMTkxNzBCQ0I3NzRENDU0NTg1ODg1MTc2MDBFMUM0MzAyQzwvZGF0YT48L3Rva2VuPg=="` +`-H "Authorization: AfasToken PHRva2VuPjx2ZXJzaW9uPjE8L3ZlcnNpb24+PGRhdGE+MzcyNjk1ODJDOTU5NDNDNEFFNURDQUVFRUY5RjRGMTkxNzBCQ0I3NzRENDU0NTg1ODg1MTc2MDBFMUM0MzAyQzwvZGF0YT48L3Rva2VuPg=="` ## Important changes @@ -77,6 +74,11 @@ In Profit, you can now also retrieve employee/formation distribution, including In Profit, you can now also retrieve employee/absence history, including the associated authorizations. This makes it easier to gain insight into absences within a team or project. +### New response header: X-Trace-Identifier + +Every call that successfully reaches our application layer now receives a response header `X-Trace-Identifier`. This header contains a unique identifier for the specific API call. This can be useful for tracing and debugging requests in collaboration with AFAS System Integrators. This header is available for both REST and SOAP API calls. +Please note that the layout of the identifier may change in the future, depending on the web server technology used. + ## Artikelen Specification ### Changelog @@ -1062,5 +1064,4 @@ No changes for this release. | removed the enum value 'VKT' of the request property 'AfasPerson/Element/Objects/AfasResidenceDocument/Element/Fields/ViTt' | HrOnboarding | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | | added the new optional request property 'AfasPerson/Element/Objects/AfasTimeTable/Element/Fields/PsBi' | HrOnboarding | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | | added the new optional request property 'AfasPerson/Element/Objects/AfasTimeTable/Element/Objects' | HrOnboarding | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | -| endpoint added | HrVacancy | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrVacancy), [PUT](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#put-/connectors/HrVacancy), [DELETE](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#delete-/connectors/HrVacancy/HrVacancy/@VcSn,@CmId/-VcSn-,-CmId-) | - +| endpoint added | HrVacancy | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrVacancy), [PUT](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#put-/connectors/HrVacancy), [DELETE](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#delete-/connectors/HrVacancy/HrVacancy/@VcSn,@CmId/-VcSn-,-CmId-) | \ No newline at end of file diff --git a/markdownpages/profit/en/partner-certification-steps.md b/markdownpages/profit/en/partner-certification-steps.md index 87037aa..fc0b7a2 100644 --- a/markdownpages/profit/en/partner-certification-steps.md +++ b/markdownpages/profit/en/partner-certification-steps.md @@ -1,9 +1,9 @@ --- -title: Certification steps for Partners author: Eric Zwaal -date: 2025-09-16 -tags: Partner, Certification, GetConnector, IntegrationId, AppConnector +date: 2025-11-08 index: true +tags: Partner, IntegrationId, Tutorial, GetConnector, UpdateConnector, AppConnector +title: Certification steps for Partners --- *[Voor Nederlands klik hier](../nl/partner-certification-steps)* @@ -125,4 +125,4 @@ We are here to ensure your integration runs smoothly and retrieves the right dat One of the System Integrators will handle your request. We answer a short question directly; if more information is needed, we will let you know and in many cases you will get a link to schedule a Teams appointment. -*Our support is free during the first 12 months of the certification process, and once you are a certified partner. In other cases, we charge €200 per hour.* +*Our support is free during the first 12 months of the certification process, and once you are a certified partner. In other cases, we charge €200 per hour.* \ No newline at end of file diff --git a/markdownpages/profit/en/start.md b/markdownpages/profit/en/start.md index 9d0b818..b1072e9 100644 --- a/markdownpages/profit/en/start.md +++ b/markdownpages/profit/en/start.md @@ -1,8 +1,8 @@ --- -title: AFAS Profit API Quick Start author: CLN -date: 2024-05-28 -tags: environment, test environment, sandbox, partner program, certification +date: 2025-11-08 +tags: Partner, GetConnector, UpdateConnector, AppConnector, Integration, Authentication +title: AFAS Profit API Quick Start --- ## Introduction to AFAS Profit @@ -64,7 +64,7 @@ We mention the tasks of the administrator here. These tasks are not explained in ## AFAS Release Policy -AFAS releases two or three versions (updates) each year. All AFAS customers use the AFAS Online platform, which is a cloud platform. With each new version, AFAS will migrate all customer environments to this new version, based on an schedule. Each customer will be informed of the migration date on which the environments will be emigrated to the new version. +AFAS releases two versions (updates) each year: around June and November. All AFAS customers use the AFAS Online platform, which is a cloud platform. With each new version, AFAS will migrate all customer environments to this new version, based on an schedule. This migration takes a maximum of 3 months. Each customer will be informed of the migration date on which the environments will be emigrated to the new version. As a result, two situations can occur: @@ -83,4 +83,4 @@ Also see: ### Read further -- [Profit API Concepts](./concepts) +- [Profit API Concepts](./concepts) \ No newline at end of file diff --git a/markdownpages/profit/en/troubleshooting.md b/markdownpages/profit/en/troubleshooting.md index 26dd239..80e7047 100644 --- a/markdownpages/profit/en/troubleshooting.md +++ b/markdownpages/profit/en/troubleshooting.md @@ -1,9 +1,10 @@ --- -title: Troubleshooting author: CLN -date: 2024-02-18 -tags: error, debug, debugging, mismatch, server +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, AppConnector, Integration, Authentication +title: Troubleshooting --- + Errors always occur during the development, testing, and running of applications. A good understanding of the types of errors and How-To implement solid error handling makes a difference in the final quality of an integration. This section focuses on general error handling and troubleshooting tips. @@ -278,4 +279,4 @@ When a custom field is added to the database, no index is created for it. This m ### 10. Parallel execution of commands (connector developer) -If a GetConnector is called by multiple processes, the call can fail. The database locks the row being fetched during the call; if other processes also call this row, it will cause an error. Schedule the calls not all at the same time so that no blocking can occur. Also, check which data collections are called each time and whether a call is made on the same data. A maximum of 8 parallel calls are allowed, keeping the above rules in mind, of course. +If a GetConnector is called by multiple processes, the call can fail. The database locks the row being fetched during the call; if other processes also call this row, it will cause an error. Schedule the calls not all at the same time so that no blocking can occur. Also, check which data collections are called each time and whether a call is made on the same data. A maximum of 8 parallel calls are allowed, keeping the above rules in mind, of course. \ No newline at end of file diff --git a/markdownpages/profit/en/update-connector.md b/markdownpages/profit/en/update-connector.md index 8fe93ce..9270ddf 100644 --- a/markdownpages/profit/en/update-connector.md +++ b/markdownpages/profit/en/update-connector.md @@ -1,9 +1,10 @@ --- -title: UpdateConnector author: CLN -date: 2024-02-18 -tags: insert, update, delete, put, post, create, remove, create, add, update +date: 2025-11-08 +tags: UpdateConnector, Authentication, Authorization, Finance, Hr, Order Management +title: UpdateConnector --- + An external application can add, change, or delete records in the Profit database with an UpdateConnector. Each endpoint has different options. In UpdateConnectors with subobjects, you can do a specific action on a subobject. ## POST @@ -197,4 +198,4 @@ In this case, the row with ID `123` is deleted based on the field `ApId`. ### Deleting a nested row -You can delete a row from a subelement. Do this by including the full key of the main element and the subelement in the request URL. +You can delete a row from a subelement. Do this by including the full key of the main element and the subelement in the request URL. \ No newline at end of file diff --git a/markdownpages/profit/nl/app-connector-auditor-afas.md b/markdownpages/profit/nl/app-connector-auditor-afas.md index 116c0d9..d59b5a9 100644 --- a/markdownpages/profit/nl/app-connector-auditor-afas.md +++ b/markdownpages/profit/nl/app-connector-auditor-afas.md @@ -1,9 +1,9 @@ --- -title: Partner Integration Self Service voor AFAS medewerkers author: Eric Zwaal -date: 2025-01-21 -tags: Appconnector, inrichting, GetConnector +date: 2025-11-08 index: false +tags: Partner, GetConnector, AppConnector, Integration, Hr +title: Partner Integration Self Service voor AFAS medewerkers --- Deze versie van de AppConnector Auditor toont vrijwel alle punten die ook op andere niveaus getoond worden. Daarnaast bevat het een flinke dosis technische informatie. Doel daarvan is: @@ -44,4 +44,4 @@ Gebruik deze tabel om te controleren of die meldingen terecht zijn. #### SQL statement -Ach, wat wil je nog meer! Het hele SQL statement, in volle glorie. Bij een meegeleverde Profit-connector is deze niet beschikbaar. +Ach, wat wil je nog meer! Het hele SQL statement, in volle glorie. Bij een meegeleverde Profit-connector is deze niet beschikbaar. \ No newline at end of file diff --git a/markdownpages/profit/nl/app-connector-auditor-partner.md b/markdownpages/profit/nl/app-connector-auditor-partner.md index 5f2f8d6..aeb4e9a 100644 --- a/markdownpages/profit/nl/app-connector-auditor-partner.md +++ b/markdownpages/profit/nl/app-connector-auditor-partner.md @@ -1,9 +1,9 @@ --- -title: AppConnector auditor voor Partners author: Eric Zwaal -date: 2025-09-16 -tags: Appconnector, inrichting, GetConnector +date: 2025-11-08 index: true +tags: Partner, IntegrationId, Tutorial, GetConnector, Profit5, AppConnector +title: AppConnector auditor voor Partners --- ## Inleiding @@ -326,4 +326,4 @@ Heb je vragen, opmerkingen, bugreports, verbetersuggesties, klachten, etc? Kom b ###### Heb je geen inlog? -Een of meer van jouw collega's zijn beheerder op de klantportal en kunnen jou toevoegen als contactpersoon, zodat jij zelf ook in kunt loggen. +Een of meer van jouw collega's zijn beheerder op de klantportal en kunnen jou toevoegen als contactpersoon, zodat jij zelf ook in kunt loggen. \ No newline at end of file diff --git a/markdownpages/profit/nl/app-connector-auditor.md b/markdownpages/profit/nl/app-connector-auditor.md index 04e9853..7ff96cd 100644 --- a/markdownpages/profit/nl/app-connector-auditor.md +++ b/markdownpages/profit/nl/app-connector-auditor.md @@ -1,9 +1,9 @@ --- -title: AppConnector auditor author: Eric Zwaal -date: 2025-09-16 -tags: Appconnector, inrichting, GetConnector, autorisatie +date: 2025-11-08 index: true +tags: Partner, GetConnector, AppConnector, Integration, Configuration, Authentication +title: AppConnector auditor --- ## Inleiding @@ -199,4 +199,4 @@ Zie [hierboven](#er-zijn-getconnectoren-met-meer-dan-10-joins). Deze GetConnecto #### Deze GetConnector haalt gegevens op uit tabellen van meer dan 5 niveaus diep. -Zie [hierboven](#er-zijn-getconnectoren-die-meer-dan-5-niveaus-diep-gegevens-ophalen). Deze GetConnector kan mogelijk geoptimaliseerd worden als je problemen ervaart met de performance van de koppeling. +Zie [hierboven](#er-zijn-getconnectoren-die-meer-dan-5-niveaus-diep-gegevens-ophalen). Deze GetConnector kan mogelijk geoptimaliseerd worden als je problemen ervaart met de performance van de koppeling. \ No newline at end of file diff --git a/markdownpages/profit/nl/authentication.md b/markdownpages/profit/nl/authentication.md index cd9442e..a7a4f74 100644 --- a/markdownpages/profit/nl/authentication.md +++ b/markdownpages/profit/nl/authentication.md @@ -1,8 +1,8 @@ --- -title: Authenticatie author: CLN -date: 2024-06-28 -tags: tokens, jwt, bearer, oauth, access +date: 2025-11-08 +tags: GetConnector, AppConnector, Integration, Configuration, Authentication, Authorization +title: Authenticatie --- ## Introductie diff --git a/markdownpages/profit/nl/concepts.md b/markdownpages/profit/nl/concepts.md index abd62e5..2397e3e 100644 --- a/markdownpages/profit/nl/concepts.md +++ b/markdownpages/profit/nl/concepts.md @@ -1,9 +1,10 @@ --- -title: Concepten author: CLN -date: 2024-02-18 -tags: Appconnector, GetConnector, UpdateConnector +date: 2025-11-10 +tags: GetConnector, UpdateConnector, AppConnector, Configuration, Authentication, Crm +title: Concepten --- + ## App Connector De App Connector is het onderdeel in AFAS Profit waarmee je App kunt integreren. De AFAS-beheerder richt deze in een aantal stappen in. In de App Connectoren worden GetConnectoren en UpdateConnectoren geautoriseerd en hier maakt de beheerder de token aan. Profit beheerders kunnen onbeperkt App Connectoren toevoegen. @@ -61,4 +62,4 @@ Deze omgeving is de eerste omgeving die een update voor een nieuwe AFAS Profit-v ### Lees verder -- [Profit API Authenticatie](./authentication) +- [Profit API Authenticatie](./authentication) \ No newline at end of file diff --git a/markdownpages/profit/nl/custom-fields.md b/markdownpages/profit/nl/custom-fields.md index b02ca7c..187ca98 100644 --- a/markdownpages/profit/nl/custom-fields.md +++ b/markdownpages/profit/nl/custom-fields.md @@ -1,8 +1,8 @@ --- -title: Vrije velden author: CLN -date: 2024-02-18 -tags: custom, customfields, vrijveld, vrijevelden, vrije velden, guids +date: 2025-11-08 +tags: GetConnector, UpdateConnector, Configuration +title: Vrije velden --- AFAS-beheerders kunnen vrije velden (custom fields) toevoegen in de meeste tabellen in Profit. Deze vrije velden worden vervolgens beschikbaar in de endpoints. @@ -73,4 +73,4 @@ curl -X PUT "https://12345.rest.afas.online/ProfitRestServices/connectors/KnPers AFAS-beheerders hebben de mogelijkheid om vrije velden toe te voegen in de omgeving. - [Inrichting](https://help.afas.nl/help/NL/SE/App_UDF_Field_Add.htm) -- [Uitwisselen tussen omgevingen](https://help.afas.nl/help/NL/SE/App_UDF_ExpImp.htm) +- [Uitwisselen tussen omgevingen](https://help.afas.nl/help/NL/SE/App_UDF_ExpImp.htm) \ No newline at end of file diff --git a/markdownpages/profit/nl/get-connector-geblokkeerd.md b/markdownpages/profit/nl/get-connector-geblokkeerd.md index bf6d9b1..72fac0f 100644 --- a/markdownpages/profit/nl/get-connector-geblokkeerd.md +++ b/markdownpages/profit/nl/get-connector-geblokkeerd.md @@ -1,9 +1,10 @@ --- -title: GetConnector geblokkeerd author: EZW -date: 2024-07-22 -tags: GetConnector, troubleshoot +date: 2025-11-08 +tags: GetConnector, Integration, Crm +title: GetConnector geblokkeerd --- + Heb jij een bericht gekregen dat er een GetConnector in jouw omgeving geblokkeerd is? Dan is dit artikel voor jou bestemd. AFAS hanteert een Fair Use policy voor het gebruik van de API. In de praktijk betekent dat, dat elke dag de 10 zwaarste gebruikers een bericht krijgen dat ze hun proces moeten aanpassen. @@ -24,4 +25,4 @@ Een GetConnector wordt altijd aangeroepen door een ander proces; dat is vaak een ## Deblokkeer de GetConnector Als het probleem is opgelost, kun je de GetConnector weer deblokkeren. Je deblokkeert een GetConnector via het volgende pad: **Algemeen / Uitvoer / Beheer / GetConnector**. Vervolgens kies je voor de actie **Definitie**. Je opent met deze actie de eigenschappen van de GetConnector. Je vinkt het veld **Geblokkeerd** uit. Zijn de geblokkeerde regels niet zichtbaar in de weergave? Klik dan op het tandwiel rechtsboven en klik op **Geblokkeerde regels tonen**. -*bron: https://help.afas.nl/meldingen/NL/SE/99797.htm* +*bron: https://help.afas.nl/meldingen/NL/SE/99797.htm* \ No newline at end of file diff --git a/markdownpages/profit/nl/get-connector.md b/markdownpages/profit/nl/get-connector.md index 3cbb0f5..c49142a 100644 --- a/markdownpages/profit/nl/get-connector.md +++ b/markdownpages/profit/nl/get-connector.md @@ -1,8 +1,8 @@ --- -title: GetConnector author: CLN -date: 2024-12-17 -tags: get, data, sortering, +date: 2025-11-08 +tags: GetConnector, AppConnector, Integration, Authorization, Hr +title: GetConnector --- Een GetConnector is een endpoint waarmee een applicatie records kan ophalen uit de Profit-database. Een AFAS-beheerder kan deze GetConnector-definities zelf samenstellen en bepaalt daarmee de records en velden die je kunt ophalen. @@ -274,4 +274,4 @@ Response: ## Rowcount op GetConnector -Om een rowcount op een GetConnector te krijgen moet je in AFAS Profit een kopie van de bestaande GetConnector aanmaken. In deze nieuwe GetConnector voeg je een verdichting toe op de sleutel (of op de velden waar je een Count van wilt hebben). De andere velden maak je onzichtbaar. Vraag de AFAS-beheerder om uit te voeren, als je niet zelf in de omgeving kunt. [Functionele beschrijving](https://help.afas.nl/help/NL/SE/App_Query_Cond.htm) +Om een rowcount op een GetConnector te krijgen moet je in AFAS Profit een kopie van de bestaande GetConnector aanmaken. In deze nieuwe GetConnector voeg je een verdichting toe op de sleutel (of op de velden waar je een Count van wilt hebben). De andere velden maak je onzichtbaar. Vraag de AFAS-beheerder om uit te voeren, als je niet zelf in de omgeving kunt. [Functionele beschrijving](https://help.afas.nl/help/NL/SE/App_Query_Cond.htm) \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-ats.md b/markdownpages/profit/nl/howto-ats.md index 47fdb22..4b526ac 100644 --- a/markdownpages/profit/nl/howto-ats.md +++ b/markdownpages/profit/nl/howto-ats.md @@ -1,8 +1,8 @@ --- -title: Onboarden van een nieuwe kandidaat author: CLN -date: 2024-04-08 -tags: kandidaat, flex, front, back, office +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Profit4, Hr, Crm +title: Onboarden van een nieuwe kandidaat --- ## Inleiding @@ -294,4 +294,4 @@ Het veld `VcSn` / Volgnummer vacature moet overeenkomen met de vacature waarop w } ``` -De aanroep naar `HrCreateApplicant` maakt een dossieritem van het type "Sollicitatie" (code -44). Bij dit dossieritem wordt de `CaId`-waarde uit de vorige response gebruikt voor de bestemming `Aanmaken sollicitatie`. Gebruik die informatie om via een eigen GetConnector het nummer van het dossieritem op te halen als je dat nodig hebt. +De aanroep naar `HrCreateApplicant` maakt een dossieritem van het type "Sollicitatie" (code -44). Bij dit dossieritem wordt de `CaId`-waarde uit de vorige response gebruikt voor de bestemming `Aanmaken sollicitatie`. Gebruik die informatie om via een eigen GetConnector het nummer van het dossieritem op te halen als je dat nodig hebt. \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-bi.md b/markdownpages/profit/nl/howto-bi.md index 42be142..8e215bc 100644 --- a/markdownpages/profit/nl/howto-bi.md +++ b/markdownpages/profit/nl/howto-bi.md @@ -1,8 +1,8 @@ --- -title: Data vanuit AFAS Profit naar BI author: CLN -date: 2024-06-19 -tags: PowerBI, qlik, business, inteligence +date: 2025-11-08 +tags: Tutorial, GetConnector, Integration, Authentication, Finance, Hr +title: Data vanuit AFAS Profit naar BI --- ## Inleiding @@ -222,4 +222,4 @@ AFAS Profit gebruik een SQL database waarbij voor elke klant de data in een apar ### Kan ik direct met de SQL database verbinden? -Nee. De AFAS API en een Excel export zijn de mogelijkheden om de data uit AFAS te halen. +Nee. De AFAS API en een Excel export zijn de mogelijkheden om de data uit AFAS te halen. \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-bijlage-dossier.md b/markdownpages/profit/nl/howto-bijlage-dossier.md index 6f2532b..9d86b3b 100644 --- a/markdownpages/profit/nl/howto-bijlage-dossier.md +++ b/markdownpages/profit/nl/howto-bijlage-dossier.md @@ -1,8 +1,8 @@ --- -title: Ophalen van bijlagen uit AFAS Profit author: CLN -date: 2024-12-03 -tags: attachement, bijlage, pdf, loonstrook, jaaropgave +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, AppConnector, Authentication, Hr +title: Ophalen van bijlagen uit AFAS Profit --- ## Inleiding @@ -183,4 +183,4 @@ In deze request zit filter: ### Tot slot -Hiermee heb je alle onderdelen doorgelopen die nodig zijn om bijlage op te halen uit AFAS. Heb je hier een vraag over? Post deze op het forum van [AFAS Connect](https://connect.afas.nl/forum). De community helpt je graag verder! +Hiermee heb je alle onderdelen doorgelopen die nodig zijn om bijlage op te halen uit AFAS. Heb je hier een vraag over? Post deze op het forum van [AFAS Connect](https://connect.afas.nl/forum). De community helpt je graag verder! \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-finance-mutation-purch.md b/markdownpages/profit/nl/howto-finance-mutation-purch.md index 533e80f..8e2bab3 100644 --- a/markdownpages/profit/nl/howto-finance-mutation-purch.md +++ b/markdownpages/profit/nl/howto-finance-mutation-purch.md @@ -1,8 +1,8 @@ --- -title: Financiële mutaties inkoop author: CLN -date: 2024-04-11 -tags: inkoop, confrontatie, inkoopfactuur +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Integration, Authentication, Finance +title: Financiële mutaties inkoop --- ## Inleiding @@ -324,4 +324,4 @@ De laatste stap is het aanmaken van de confrontatie zelf. Hiervoor heb je het `I "CfSt": "2" } } -``` +``` \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-finance-mutation.md b/markdownpages/profit/nl/howto-finance-mutation.md index 13aa51c..e92a818 100644 --- a/markdownpages/profit/nl/howto-finance-mutation.md +++ b/markdownpages/profit/nl/howto-finance-mutation.md @@ -1,8 +1,8 @@ --- -title: Financiële Mutatie Verkoop author: CLN -date: 2024-10-28 -tags: Financieel, mutaties, boeken, verkoop +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Integration, Configuration, Authentication +title: Financiële Mutatie Verkoop --- ## Inleiding @@ -380,4 +380,4 @@ In sommige sitaties wil je de financiële factuur, die automatisch wordt aangema } } } -``` +``` \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-flex.md b/markdownpages/profit/nl/howto-flex.md index 9032ec7..4286f54 100644 --- a/markdownpages/profit/nl/howto-flex.md +++ b/markdownpages/profit/nl/howto-flex.md @@ -1,8 +1,8 @@ --- -title: Verkooprelatie en klantovereenkomst - flex author: CLN -date: 2024-04-11 -tags: flex, verkooprelatie, klantovereenkomst +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Authentication, Crm, Projects +title: Verkooprelatie en klantovereenkomst - flex --- ## Inleiding @@ -147,4 +147,4 @@ Voorbeeld request: } } } -``` +``` \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-la-sa.md b/markdownpages/profit/nl/howto-la-sa.md index 4085b19..d36faa3 100644 --- a/markdownpages/profit/nl/howto-la-sa.md +++ b/markdownpages/profit/nl/howto-la-sa.md @@ -1,8 +1,8 @@ --- -title: Loonadministratie aansluiten op salarisadministratie author: Eric Zwaal -date: 2025-01-21 -tags: looncomponent, journaalpost +date: 2025-11-08 +tags: Tutorial, GetConnector, Authentication, Hr, Payroll +title: Loonadministratie aansluiten op salarisadministratie --- ## Inleiding @@ -188,4 +188,4 @@ Ik toon een beperkt resultaat. Je ziet dat er geen reiskosten zijn (ze werkte im ## Gerelateerde artikelen -Haal je veel gegevens op? [Gebruik dan skip en take.](./get-connector) +Haal je veel gegevens op? [Gebruik dan skip en take.](./get-connector) \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-medewerker-ad.md b/markdownpages/profit/nl/howto-medewerker-ad.md index de5d652..6ec10af 100644 --- a/markdownpages/profit/nl/howto-medewerker-ad.md +++ b/markdownpages/profit/nl/howto-medewerker-ad.md @@ -1,8 +1,8 @@ --- -title: Medewerker synchronisatie met Active Directory author: CLN -date: 2024-04-11 -tags: AD, Active, directory +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Authentication, Hr, Crm +title: Medewerker synchronisatie met Active Directory --- ## Inleiding @@ -145,4 +145,4 @@ Endpoint: [PUT KnEmployee](../../apidoc/nl/Medewerker%20en%20contract#put-/conne } } } -``` +``` \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-mobility.md b/markdownpages/profit/nl/howto-mobility.md index 67b8eb9..208c51e 100644 --- a/markdownpages/profit/nl/howto-mobility.md +++ b/markdownpages/profit/nl/howto-mobility.md @@ -1,8 +1,8 @@ --- -title: Vervoermiddel voor medewerker author: CLN -date: 2024-04-04 -tags: auto, fiets, vervoer, mobiliteit +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Integration, Configuration, Authentication +title: Vervoermiddel voor medewerker --- ## Inleiding @@ -190,4 +190,4 @@ Tenslotte maak je optioneel een dossieritem met bijvoorbeeld de lease overeenkom } } } -``` +``` \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-plaatsing.md b/markdownpages/profit/nl/howto-plaatsing.md index a6137d8..2ba0517 100644 --- a/markdownpages/profit/nl/howto-plaatsing.md +++ b/markdownpages/profit/nl/howto-plaatsing.md @@ -1,8 +1,8 @@ --- -title: Plaatsing - flex author: CLN -date: 2024-05-02 -tags: flex, Plaatsing, conceptplaatsing +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Integration, Authentication, Hr +title: Plaatsing - flex --- > LET OP; deze How-To is in concept. @@ -184,4 +184,4 @@ Voorbeeld request: } } } -``` +``` \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-quickstart.md b/markdownpages/profit/nl/howto-quickstart.md index e388d2e..57a65e3 100644 --- a/markdownpages/profit/nl/howto-quickstart.md +++ b/markdownpages/profit/nl/howto-quickstart.md @@ -1,8 +1,8 @@ --- -title: Quickstart - Maak je eerste request author: CLN -date: 2024-05-28 -tags: quickstart, token +date: 2025-11-08 +tags: Partner, Tutorial, GetConnector, Integration, Authentication, Authorization +title: Quickstart - Maak je eerste request --- Deze How-To geeft je alles wat je nodig hebt om te beginnen met het gebruik van de AFAS Profit REST API. @@ -257,4 +257,4 @@ func main() { Nu je succesvol kan authenticeren en data kan ophalen ben je klaar om je volledige proces te integreren. Begin bijvoorbeeld met één van deze How-To's: -- [Medewerker AD Sync](./howto-medewerker-ad) +- [Medewerker AD Sync](./howto-medewerker-ad) \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-vat-reclaim.md b/markdownpages/profit/nl/howto-vat-reclaim.md index a479fc9..63edbdb 100644 --- a/markdownpages/profit/nl/howto-vat-reclaim.md +++ b/markdownpages/profit/nl/howto-vat-reclaim.md @@ -1,10 +1,10 @@ --- -title: Btw-terugvordering via de API author: EZW -date: 2024-09-30 -tags: Financieel, mutaties, boeken, inkoop, btw +date: 2025-11-11 +tags: Partner, Tutorial, GetConnector, UpdateConnector, Profit3, AppConnector +title: Btw-terugvordering via de API --- - + ## Inleiding ### Stuur jij vanuit een scan- en herkenoplossing financiële mutaties naar AFAS? Lees deze pagina dan zorgvuldig! @@ -79,5 +79,4 @@ Niet doen: Gewoon proberen en kijken of je een foutcode krijgt. ### Ik maak gebruik van de mogelijkheid om automatisch nieuwe verbijzonderingstoewijzingen te maken (AdDa). Wat nu? -Die mogelijkheid blijft gewoon bestaan. Aan de aitomatisch aangemaakte verbijzonderingstoewijzing wordt geen btw-terugvorderingscode gekoppeld. - +Die mogelijkheid blijft gewoon bestaan. Aan de automatisch aangemaakte verbijzonderingstoewijzing wordt geen btw-terugvorderingscode gekoppeld. \ No newline at end of file diff --git a/markdownpages/profit/nl/howto-workflow-acties.md b/markdownpages/profit/nl/howto-workflow-acties.md index 14939e1..8955790 100644 --- a/markdownpages/profit/nl/howto-workflow-acties.md +++ b/markdownpages/profit/nl/howto-workflow-acties.md @@ -1,8 +1,8 @@ --- -title: Dossieritems aanmaken en workflowactie uitvoeren author: CLN -date: 2024-07-09 -tags: AFAS, Profit, API, dossier-items, workflow, bijlagen, kenmerken +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Integration, Configuration, Authentication +title: Dossieritems aanmaken en workflowactie uitvoeren --- ## Inleiding @@ -447,4 +447,4 @@ In dit voorbeeld zijn er bij de taak waarin het dossieritem staat, 3 acties besc ### Tot slot -Hiermee heb je alle onderdelen gezien die je kunt gebruiken bij het opzetten van een integratie met dossieritems en workflows. Gebruik de voorbeelden en het JSON schema van de endpoints om alle properties te zien. +Hiermee heb je alle onderdelen gezien die je kunt gebruiken bij het opzetten van een integratie met dossieritems en workflows. Gebruik de voorbeelden en het JSON schema van de endpoints om alle properties te zien. \ No newline at end of file diff --git a/markdownpages/profit/nl/integrationid.md b/markdownpages/profit/nl/integrationid.md index 4f114de..6081294 100644 --- a/markdownpages/profit/nl/integrationid.md +++ b/markdownpages/profit/nl/integrationid.md @@ -1,8 +1,8 @@ --- -title: AFAS IntegrationId author: CLN -date: 2024-06-27 -tags: +date: 2025-11-08 +tags: Partner, IntegrationId, UpdateConnector, Integration, Authorization, Crm +title: AFAS IntegrationId --- ## Wat is een IntegrationId @@ -117,4 +117,4 @@ Hiermee ziet AFAS om welke integratie het gaat. Je kunt namelijk meerdere integr - `12345` = jouw abonnementsnummer - `678900` = projectnummer van deze integratie -Zo kan AFAS klanten en partners aan elkaar koppelen. In de URL staat het abonnementsnummer van de klant. In het IntegrationId staat jouw abonnementsnummer. +Zo kan AFAS klanten en partners aan elkaar koppelen. In de URL staat het abonnementsnummer van de klant. In het IntegrationId staat jouw abonnementsnummer. \ No newline at end of file diff --git a/markdownpages/profit/nl/news-api-docs.md b/markdownpages/profit/nl/news-api-docs.md index 3417d67..74f898d 100644 --- a/markdownpages/profit/nl/news-api-docs.md +++ b/markdownpages/profit/nl/news-api-docs.md @@ -1,8 +1,8 @@ --- -title: API Docs v2 author: CLN -date: 2024-10-18 -tags: API Docs +date: 2025-11-08 +tags: Tutorial, UpdateConnector, Profit6, Integration, Authentication, Authorization +title: API Docs v2 --- Welkom op de nieuwste versie van de AFAS API Docs. We zijn blij je dat hier gebruik van maakt! Met de AFAS API Docs willen we het zo makkelijk mogelijk maken om geweldige integraties met de AFAS producten te maken. Hiervoor hebben we een uitgebreide API specifcatie gemaakt met meer dan 1000 voorbeeld requests. Waar bij jij het meest blij mee? Wij zelf tevreden met alle voorbeelden bij [KnEmployee](../../apidoc/nl/Medewerker%20en%20contract#post-/connectors/KnEmployee). @@ -37,4 +37,4 @@ In de documentatie en in de How-To's kun je nu ook zien wanneer deze voor het la ## Verbetering melden? -Heb je iets gevonden wat niet klopt of net niet lekker werkt? Laat het weten via het forum op [connect.afas.nl](https://connect.afas.nl) of via de [AFAS Klantportal](https://klant.afas.nl/aanmaken-support-customer-care/help-center-aanvraag?&utm_source=help.afas.nl&utm_medium=verbetersuggestie-insturen) +Heb je iets gevonden wat niet klopt of net niet lekker werkt? Laat het weten via het forum op [connect.afas.nl](https://connect.afas.nl) of via de [AFAS Klantportal](https://klant.afas.nl/aanmaken-support-customer-care/help-center-aanvraag?&utm_source=help.afas.nl&utm_medium=verbetersuggestie-insturen) \ No newline at end of file diff --git a/markdownpages/profit/nl/news-profit3.md b/markdownpages/profit/nl/news-profit3.md index bac4a9e..b67a4e5 100644 --- a/markdownpages/profit/nl/news-profit3.md +++ b/markdownpages/profit/nl/news-profit3.md @@ -1,8 +1,8 @@ --- -title: Nieuw in Profit 3 author: CLN -date: 2024-08-14 -tags: Profit3 +date: 2025-11-08 +tags: Tutorial, GetConnector, UpdateConnector, Profit4, Profit3, Configuration +title: Nieuw in Profit 3 --- Vanaf Profit 3 is er een aantal wijzigingen in de AFAS Profit API doorgevoerd. Hieronder staan alle wijzigingen die er zijn. Benieuwd naar onze roadmap? [Klik hier](https://www.afas.nl/roadmap) diff --git a/markdownpages/profit/nl/news-profit4.md b/markdownpages/profit/nl/news-profit4.md index 7709c4e..0757173 100644 --- a/markdownpages/profit/nl/news-profit4.md +++ b/markdownpages/profit/nl/news-profit4.md @@ -1,8 +1,8 @@ --- -title: Nieuw in Profit 4 author: EZW -date: 2024-10-25 -tags: Profit4 +date: 2025-11-08 +tags: UpdateConnector, Profit4, Profit3, Configuration, Hr, Payroll +title: Nieuw in Profit 4 --- Vanaf Profit 4 is er een aantal wijzigingen in de AFAS Profit API doorgevoerd. Hieronder staan wijzigingen ten opzichte van Profit 3. Benieuwd naar onze roadmap? [Klik hier](https://www.afas.nl/roadmap) @@ -316,4 +316,3 @@ Change in documentation only; endpoint was never available. | Description | Connector | Operation | | --- | --- | --- | | endpoint added | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | - diff --git a/markdownpages/profit/nl/news-profit5.md b/markdownpages/profit/nl/news-profit5.md index 06a79b2..2385365 100644 --- a/markdownpages/profit/nl/news-profit5.md +++ b/markdownpages/profit/nl/news-profit5.md @@ -1,8 +1,8 @@ --- -title: Nieuw in Profit 5 author: EZW -date: 2024-12-12 -tags: Profit5 +date: 2025-11-08 +tags: UpdateConnector, Profit5, Profit4, Configuration, Hr, Payroll +title: Nieuw in Profit 5 --- Vanaf Profit 5 is er een aantal wijzigingen in de AFAS Profit API doorgevoerd. Hieronder staan wijzigingen ten opzichte van Profit 4. Benieuwd naar onze roadmap? [Klik hier](https://www.afas.nl/roadmap) diff --git a/markdownpages/profit/nl/news-profit6.md b/markdownpages/profit/nl/news-profit6.md index b756f4b..62a4122 100644 --- a/markdownpages/profit/nl/news-profit6.md +++ b/markdownpages/profit/nl/news-profit6.md @@ -1,8 +1,8 @@ --- -title: Nieuw in Profit 6 author: EZW -date: 2025-06-16 -tags: Profit6 +date: 2025-11-10 +tags: Profit6, GetConnector, UpdateConnector, Configuration, Authentication +title: Nieuw in Profit 6 --- Vanaf Profit 6 is er een aantal wijzigingen in de AFAS Profit API doorgevoerd. Hieronder staan wijzigingen ten opzichte van Profit 5. Benieuwd naar onze roadmap? [Klik hier](https://www.afas.nl/roadmap) @@ -442,5 +442,4 @@ No changes for this release. | added the new optional request property 'AfasPerson/Element/Objects/AfasEmployee/Element/Fields/EmUs' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | | added the new optional request property 'AfasPerson/Element/Objects/AfasHrApplic' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | | removed the enum value 'KS' of the request property 'AfasPerson/Element/Fields/PsNa' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | -| removed the enum value 'KS' of the request property 'AfasPerson/Element/Objects/AfasIdentityDocument/Element/Fields/ViNa' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | - +| removed the enum value 'KS' of the request property 'AfasPerson/Element/Objects/AfasIdentityDocument/Element/Fields/ViNa' | HrOnboarding | [POST](../../apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | \ No newline at end of file diff --git a/markdownpages/profit/nl/news-profit7.md b/markdownpages/profit/nl/news-profit7.md index 6e205c0..f8f977d 100644 --- a/markdownpages/profit/nl/news-profit7.md +++ b/markdownpages/profit/nl/news-profit7.md @@ -1,13 +1,13 @@ --- -title: Nieuw in Profit 7 author: EZW -date: 2025-11-06 -tags: Profit7 +date: 2025-11-10 +tags: Profit7, GetConnector, UpdateConnector, Integration, Configuration +title: Nieuw in Profit 7 --- -Vanaf Profit 7 is er een aantal wijzigingen in de AFAS Profit API doorgevoerd. Hieronder staan wijzigingen ten opzichte van Profit 6. Benieuwd naar onze roadmap? [Klik hier](https://www.afas.nl/roadmap) +Vanaf Profit 7 is er een aantal wijzigingen in de AFAS Profit API doorgevoerd. Hieronder staan wijzigingen ten opzichte van Profit 6. Benieuwd naar onze roadmap? [Klik hier](https://www.afas.nl/roadmap) -> Hoe lees je dit? Profit heeft een omvangrijke API met veel verschillende onderdelen. De API specificaties zijn opgedeeld in onderdelen die bij elkaar horen. Per onderdeel zijn de wijzigingen aangegeven. +> Hoe lees je dit? Profit heeft een omvangrijke API met veel verschillende onderdelen. De API specificaties zijn opgedeeld in onderdelen die bij elkaar horen. Per onderdeel zijn de wijzigingen aangegeven. ## ***Breaking* wijzigingen** @@ -30,7 +30,7 @@ Geef de header mee als `"AfasToken "`: ### Gewijzigde formattering van resultaten van GetConnector -In Profit 6 maakte de SQL Server de resultaten van een GetConnector. In Profit 7 doet Profit dat zelf. Het gaat hierbij om JSON bij REST en XML bij SOAP. +In Profit 6 maakte de SQL Server de resultaten van een GetConnector. In Profit 7 doet Profit dat zelf. Het gaat hierbij om JSON bij REST en XML bij SOAP. **Let op**: het formaat van de resultaten is anders. Als je gebruik maakt van een standaard XML/JSON parser zal dit geen probleem geven. - Decimalen zien er anders uit. Voorbeeld: -.5 wordt nu -0.5 @@ -76,6 +76,11 @@ In Profit kun je nu ook de medewerker/formatieverdeling ophalen, inclusief de bi In Profit kun je nu ook de medewerker/verzuimverloop ophalen, inclusief de bijbehorende autorisaties. Dit maakt het eenvoudiger om inzicht te krijgen in het verzuim binnen een team of project. +### Nieuwe response header: X-Trace-Identifier + +Elke call die succesvol tot in onze applicatielaag is gekomen, krijgt nu een responseheader `X-Trace-Identifier`. Deze header bevat een unieke identifier voor de specifieke API-aanroep. Dit kan nuttig zijn voor het traceren en debuggen van verzoeken in samenwerking met de AFAS Systemintegrators. Deze header is beschikbaar voor zowel REST als SOAP API-aanroepen. +Let op dat in de toekomst de layout van de identifier kan wijzigen, afhankelijk van de gebruikte webserver technologie. + ## Artikelen Specification ### Changelog @@ -1061,5 +1066,4 @@ No changes for this release. | removed the enum value 'VKT' of the request property 'AfasPerson/Element/Objects/AfasResidenceDocument/Element/Fields/ViTt' | HrOnboarding | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | | added the new optional request property 'AfasPerson/Element/Objects/AfasTimeTable/Element/Fields/PsBi' | HrOnboarding | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | | added the new optional request property 'AfasPerson/Element/Objects/AfasTimeTable/Element/Objects' | HrOnboarding | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrOnboarding) | -| endpoint added | HrVacancy | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrVacancy), [PUT](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#put-/connectors/HrVacancy), [DELETE](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#delete-/connectors/HrVacancy/HrVacancy/@VcSn,@CmId/-VcSn-,-CmId-) | - +| endpoint added | HrVacancy | [POST](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#post-/connectors/HrVacancy), [PUT](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#put-/connectors/HrVacancy), [DELETE](https://docs.afas.help/apidoc/nl/Werving%20en%20selectie#delete-/connectors/HrVacancy/HrVacancy/@VcSn,@CmId/-VcSn-,-CmId-) | \ No newline at end of file diff --git a/markdownpages/profit/nl/partner-certification-steps.md b/markdownpages/profit/nl/partner-certification-steps.md index e69b296..a248a53 100644 --- a/markdownpages/profit/nl/partner-certification-steps.md +++ b/markdownpages/profit/nl/partner-certification-steps.md @@ -1,9 +1,9 @@ --- -title: Certificeringsstappen voor partners author: Eric Zwaal -date: 2025-09-16 -tags: Partner, Certificering, GetConnector, IntegrationId +date: 2025-11-08 index: true +tags: Partner, IntegrationId, GetConnector, AppConnector, Integration, Configuration +title: Certificeringsstappen voor partners --- *[For English click here](../en/partner-certification-steps)* @@ -144,4 +144,4 @@ Wij staan voor je klaar om ervoor te zorgen dat jouw koppeling soepel loopt en d Eén van de Systemintegrators zal de aanvraag oppakken. Een korte vraag beantwoorden we direct; als er meer informatie nodig is laten we dat wten en in veel gevallen krijg je een linkje waarmee je een Teams-afspraak kan inplannen. -*Onze ondersteuning is gratis tijdens de eerste 12 maanden van het certiferingstraject, en als je eenmaal gecertificeerd partner bent. In andere gevallen rekenen wij €200 per uur.* +*Onze ondersteuning is gratis tijdens de eerste 12 maanden van het certiferingstraject, en als je eenmaal gecertificeerd partner bent. In andere gevallen rekenen wij €200 per uur.* \ No newline at end of file diff --git a/markdownpages/profit/nl/start.md b/markdownpages/profit/nl/start.md index a26369d..8834b61 100644 --- a/markdownpages/profit/nl/start.md +++ b/markdownpages/profit/nl/start.md @@ -1,9 +1,10 @@ --- -title: AFAS Profit API Quick start author: CLN -date: 2024-02-18 -tags: omgeving, testomgeving, sandbox, partner programma, certificering +date: 2025-11-08 +tags: Partner, GetConnector, UpdateConnector, AppConnector, Integration, Authentication +title: AFAS Profit API Quick start --- + ## Introductie AFAS Profit Met AFAS Profit worden alle administratieve processen in één softwareoplossing verwerkt. Dit betekent ook dat er gebruik gemaakt wordt van één database. Daardoor kunnen de bedrijfsprocessen naadloos op elkaar worden afgestemd. Gegevens worden eenmalig vastgelegd. De salarisadministratie wordt hierdoor een logisch gevolg van de HR-administratie en de financiële administratie wordt een logisch gevolg van je bedrijfsprocessen. En het mooiste is: veel administratief werk in je organisatie wordt geautomatiseerd. @@ -63,7 +64,7 @@ We noemen hier de taken van de beheerder. In deze API-documentatie worden de beh ## Releasebeleid van AFAS -AFAS brengt elk jaar twee of drie versies (updates) uit. Alle AFAS-klanten maken gebruik van het AFAS Online platform, dit is een cloud-platform. Bij elke nieuwe versie zal AFAS alle klantomgevingen op basis van een planning migreren naar deze nieuwe versie. Elke klant wordt op de hoogte gesteld van de datum waarop de omgevingen worden gemigreerd naar de nieuwe versie. +AFAS brengt elk jaar twee versies (updates) uit: rond juni en november. Alle AFAS-klanten maken gebruik van het AFAS Online platform, dit is een cloud-platform. Bij elke nieuwe versie zal AFAS alle klantomgevingen op basis van een planning migreren naar deze nieuwe versie. Deze migratie duurt maximaal 3 maanden. Elke klant wordt op de hoogte gesteld van de datum waarop de omgevingen worden gemigreerd naar de nieuwe versie. Hierdoor kunnen zich twee situaties voordoen: @@ -82,4 +83,4 @@ Zie ook: ### Lees verder -- [Profit API Concepten](./concepts) +- [Profit API Concepten](./concepts) \ No newline at end of file diff --git a/markdownpages/profit/nl/troubleshooting.md b/markdownpages/profit/nl/troubleshooting.md index 6cadb95..2a3f52d 100644 --- a/markdownpages/profit/nl/troubleshooting.md +++ b/markdownpages/profit/nl/troubleshooting.md @@ -1,8 +1,8 @@ --- -title: Fouten verhelpen author: CLN -date: 2025-01-06 -tags: error, debug, debugging, mismatch, server, fout, foutmelding +date: 2025-11-08 +tags: GetConnector, UpdateConnector, AppConnector, Integration, Authentication, Hr +title: Fouten verhelpen --- Fouten ontstaan altijd tijdens het ontwikkelen, testen en draaien van applicaties. Een goed begrip van welk soort fouten er zijn en op welke manier je solide foutafhandeling inbouwt, maak het verschil in de uiteindelijke kwaliteit van een integratie. @@ -279,4 +279,4 @@ Als er een vrij veld wordt toegevoegd aan de database wordt hier geen index op g ### 10. Parallel uitvoeren van opdrachten (ontwikkelaar van de koppeling) -Als er door meerdere processen een GetConnector wordt aangeroepen kan hierdoor de aanroep mis gaan. De database blokkeert tijdens de aanroep de regel die wordt opgehaald, als er andere processen ook deze regel aanroepen gaat dit fout. Plan dan ook de aanroepen niet allemaal op één moment zodat er geen blokkeringen kunnen ontstaan. Kijk ook goed welke gegevensverzamelingen worden aangeroepen per keer, en of er niet een aanroep wordt gedaan op dezelfde gegevens. Er zijn maximaal 8 parallelle aanroepen toegestaan, neem hierbij de bovenstaande regels uiteraard in acht. +Als er door meerdere processen een GetConnector wordt aangeroepen kan hierdoor de aanroep mis gaan. De database blokkeert tijdens de aanroep de regel die wordt opgehaald, als er andere processen ook deze regel aanroepen gaat dit fout. Plan dan ook de aanroepen niet allemaal op één moment zodat er geen blokkeringen kunnen ontstaan. Kijk ook goed welke gegevensverzamelingen worden aangeroepen per keer, en of er niet een aanroep wordt gedaan op dezelfde gegevens. Er zijn maximaal 8 parallelle aanroepen toegestaan, neem hierbij de bovenstaande regels uiteraard in acht. \ No newline at end of file diff --git a/markdownpages/profit/nl/update-connector.md b/markdownpages/profit/nl/update-connector.md index bf63927..da00275 100644 --- a/markdownpages/profit/nl/update-connector.md +++ b/markdownpages/profit/nl/update-connector.md @@ -1,9 +1,10 @@ --- -title: UpdateConnector author: CLN -date: 2024-02-18 -tags: insert, update, delete, put, post, create, remove, aanmaken, toevoegen, bijwerken +date: 2025-11-08 +tags: UpdateConnector, Authorization, Hr, Order Management +title: UpdateConnector --- + Een externe applicatie kan records in de Profit-database toevoegen, wijzigen of verwijderen via een UpdateConnector (de mogelijkheden verschillen per endpoint). In UpdateConnectoren met subobjecten is het mogelijk om een specifieke actie op een subobject mee te geven. ## POST @@ -199,4 +200,4 @@ Hier wordt op basis het veld `ApId` regel met identifier `123` verwijderd. ### Geneste regel verwijderen -Het is mogelijk om een regel uit een subelement te verwijderen. Dit kan je doen door de volledige sleutel van het hoofd element en het subelement in de request URL op te nemen. +Het is mogelijk om een regel uit een subelement te verwijderen. Dit kan je doen door de volledige sleutel van het hoofd element en het subelement in de request URL op te nemen. \ No newline at end of file diff --git a/scripts/README.md b/scripts/README.md index fbd5056..eab699c 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,10 +1,12 @@ # Markdown Naming Validator -This directory contains scripts for validating markdown file naming conventions in the repository. +This directory contains scripts for validating markdown file naming conventions and frontmatter dates in the repository. ## Files -- `markdown-naming-check.py` - Main validation script that checks if markdown files follow kebab-case naming convention. The script will provide suggested names for any violations found. +- `markdown-naming-check.py` - Main validation script that checks if markdown files follow kebab-case naming convention and validates frontmatter dates for changed files. The script will provide suggested names for any violations found. + +- `add_tags_to_markdown.py` - Script to automatically add relevant tags to markdown files in frontmatter. - `README.md` - This documentation file @@ -33,11 +35,28 @@ All markdown files must follow **kebab-case** naming convention: ### Exceptions - `AppConnectorAuditor*.md` files are temporarily exempt from this naming convention +## Date Validation + +When using the `--git` flag, the script also validates that the `date` field in the frontmatter of changed files matches the current date. This ensures that modified documents have up-to-date timestamps. +Updating the date can be done automatically using the `--fix_dates` flag. + +### Date Format +The date in frontmatter should be in ISO format without quotes: +```yaml +--- +date: 2025-11-11 +--- +``` + ## Usage ### Basic Usage ```bash +# Check all files (naming only) python markdown-naming-check.py + +# Check only changed files in git (naming + date validation) +python markdown-naming-check.py --git ``` ### Advanced Usage @@ -45,19 +64,32 @@ python markdown-naming-check.py # Specify a different root directory python markdown-naming-check.py --root-path ./docs -# Focus on specific content folders -python markdown-naming-check.py --root-path markdownpages +# Focus on specific content folders with git mode +python markdown-naming-check.py --git --root-path markdownpages # Exclude specific patterns (if needed) python markdown-naming-check.py --exclude ".github/*" "temp/*" "draft_*.md" # Get JSON output for integration -python markdown-naming-check.py --json +python markdown-naming-check.py --git --json # Show help python markdown-naming-check.py --help ``` +## Validation Modes + +### All Files Mode (default) +- Validates naming conventions for all markdown files +- Does NOT validate dates +- Use for initial repository setup or comprehensive checks + +### Git Mode (`--git` flag) +- Only validates new or modified files (staged, unstaged, and untracked) +- Validates both naming conventions AND frontmatter dates +- Ensures changed files have current date +- Ideal for pre-commit hooks and CI/CD pipelines + ## Validation Methods ### Automatic Validation @@ -71,9 +103,65 @@ git commit --no-verify # Skip pre-commit validation (not recommended) ## Exit Codes -- `0` - All files follow naming conventions (success) +- `0` - All files follow naming conventions and dates are correct (success) - `1` - Violations found or error occurred (failure) +## Output Examples + +### Successful Validation (Git Mode) +``` +============================================================ +Markdown File Naming Validation Report +Mode: Git changes only (new/modified files) +============================================================ +Total markdown files checked: 5 +Naming violations found: 0 +Date violations found: 0 + +✅ All markdown files follow the kebab-case naming convention! +✅ All changed files have correct date (2025-11-11) in frontmatter! +✅ Validation PASSED +``` + +### Naming Violation Example +``` +============================================================ +Markdown File Naming Validation Report +Mode: All files +============================================================ +Total markdown files checked: 10 +Naming violations found: 1 + +NAMING VIOLATIONS DETECTED: +---------------------------------------- +1. File: markdownpages/profit/en/Howto-Example.md + Current name: Howto-Example.md + Suggested name: howto-example.md + +SUMMARY: +❌ Naming validation FAILED - Please rename the files above to follow kebab-case convention. +``` + +### Date Violation Example (Git Mode) +``` +============================================================ +Markdown File Naming Validation Report +Mode: Git changes only (new/modified files) +============================================================ +Total markdown files checked: 3 +Naming violations found: 0 +Date violations found: 1 + +DATE VIOLATIONS DETECTED: +---------------------------------------- +1. File: markdownpages/profit/nl/start.md + Current date: 2024-02-18 + Expected date: 2025-11-11 + +SUMMARY: +❌ Date validation FAILED - Please update the date in frontmatter to 2025-11-11. +``` + ## GitHub Actions Integration The script is automatically run by the GitHub Actions workflow defined in `.github/workflows/markdown-naming-check.yml` on: @@ -121,13 +209,30 @@ bash scripts/enable-pre-commit-hook.sh ### Common Issues 1. **Python not found**: Hook will skip with warning, validation runs in GitHub Actions -2. **Validation failing**: Check output for specific files that need renaming +2. **Validation failing**: Check output for specific files that need renaming or date updates 3. **False positives**: Verify AppConnectorAuditor files are excluded -4. **Bypass validation**: Use `git commit --no-verify` (not recommended) +4. **Date mismatch**: Use `--fix_dates` flag to automatically update dates +5. **Encoding errors**: Script now handles UTF-8 properly for emoji output on Windows +6. **Bypass validation**: Use `git commit --no-verify` (not recommended) + +### Automatic Date Updates + +If you need to update dates in frontmatter for changed files: + +```bash +# Use the --fix_dates flag to updates dates +cd scripts +python markdown-naming-check.py --fix_dates +``` + +This will: +- Update the `date` field to the current date +- Format dates correctly without quotes (YAML date format) ### Getting Help -- Check validation output for file rename suggestions +- Check validation output for file rename suggestions and date requirements - Review naming convention examples above +- Use `--git` flag to validate only changed files - Validation always runs in GitHub Actions regardless of local setup - Contact the development team for assistance diff --git a/scripts/add_tags_to_markdown.py b/scripts/add_tags_to_markdown.py new file mode 100644 index 0000000..b09c563 --- /dev/null +++ b/scripts/add_tags_to_markdown.py @@ -0,0 +1,239 @@ +""" +Script to automatically add relevant tags to markdown files in the markdownpages directory. +Maximum of 6 tags per document based on content, filename, and location. +""" + +import os +import re +from pathlib import Path +from typing import List, Set +from datetime import datetime +import frontmatter + +# Define tag mappings based on keywords and context +TAG_KEYWORDS = { + # Version + 'Profit9': ['profit9', 'profit 9'], + 'Profit8': ['profit8', 'profit 8'], + 'Profit7': ['profit7', 'profit 7'], + 'Profit6': ['profit6', 'profit 6'], + 'Profit5': ['profit5', 'profit 5'], + 'Profit4': ['profit4', 'profit 4'], + 'Profit3': ['profit3', 'profit 3'], + + # HTTP Methods + 'GetConnector': ['get', 'getconnector'], + 'UpdateConnector': ['post', 'put', 'delete', 'updateconnector'], + + # Technical + 'AppConnector': ['appconnector', 'app connector'], + 'Partner': ['partner', 'partners'], + 'IntegrationId': ['integrationid'], + 'Integration': ['integration', 'integratie', 'koppeling', 'certificering', 'certification'], + 'Configuration': ['configuration', 'config', 'setup', 'instellingen', 'inrichting', 'tokens'], + 'Authentication': ['authentication', 'auth', 'token', 'login', 'credential', 'security'], + 'Authorization': ['authorization', 'permission', 'role', 'access', 'rights'], + + # Domain areas + 'Finance': ['finance', 'financial', 'grootboek', 'journaal', 'ledger', 'journal', 'invoice', 'factuur', 'debit', 'credit', 'payment', 'betaling'], + 'Hr': ['hr', 'hrm', 'employee', 'employees', 'medewerker', 'medewerkers', 'absence', 'verlof', 'salary', 'salaris', 'applicant', 'applicants', 'sollicitant', 'sollicitanten'], + 'Payroll': ['payroll', 'loonadministratie', 'loonheffingen', 'looncomponent', 'looncomponenten', 'salary component', 'salary components'], + 'Crm': ['crm', 'contact', 'customer', 'klant', 'debtor', 'debiteur', 'creditor', 'crediteur', 'organisatie', 'persoon', 'organization', 'person'], + 'Order Management': ['sales', 'order', 'bestelling', 'purchase', 'inkoop', 'delivery', 'levering', 'goods'], + 'Projects': ['project', 'hour', 'hours', 'uur', 'uren', 'registration', 'urenregistratie'], + 'Taxes': ['fiscaal', 'ib', 'tax', 'vpb', 'aangifte'], + 'Construction': ['bouw', 'construction'], + 'Flex': ['flex', 'flexmodule', 'flex module', 'plaatsing', 'plaatsingen', 'kandidaat', 'kandidaten', 'uitzendkracht', 'uitzendkrachten', 'candidate', 'candidates', 'temporary worker', 'temporary workers'], + + # Specific entities + 'Dossier': ['subject', 'dossier', 'bijlage'], + 'Organization': ['organization', 'organisation', 'organisatie', 'company', 'bedrijf'], + 'Person': ['person', 'persoon', 'people', 'individual'], + + # Functional + 'Tutorial': ['tutorial', 'guide', 'how-to', 'howto', 'stappenplan'], + 'Reference': ['reference', 'spec', 'specification', 'documentation'], +} + +def extract_frontmatter(content: str) -> tuple[dict, str]: + """Extract YAML frontmatter from markdown content using python-frontmatter.""" + try: + post = frontmatter.loads(content) + return post.metadata, post.content + except Exception: + return {}, content + + +def generate_tags(filepath: Path, content: str, frontmatter: dict) -> List[str]: + """Generate relevant tags based on file location, name, and content.""" + # Step 1: Get existing tags from frontmatter + existing_tags = frontmatter.get('tags', []) + if isinstance(existing_tags, str): + # Handle comma-separated string + existing_tags = [tag.strip() for tag in existing_tags.split(',') if tag.strip()] + elif isinstance(existing_tags, list): + # Handle YAML list + existing_tags = [str(tag).strip() for tag in existing_tags if tag] + else: + existing_tags = [] + + # Step 2: Analyze content and filename for keywords to generate new tags + text_to_analyze = (content + ' ' + filepath.stem + ' ' + frontmatter.get('title', '')).lower() + + # Keep track of generated tags in order they appear in TAG_KEYWORDS + generated_tags = [] + generated_tags_set = set() + + for tag, keywords in TAG_KEYWORDS.items(): + # Skip if we already have this tag + if tag in generated_tags_set: + continue + + # Check if any keyword appears as a whole word in text + for keyword in keywords: + # Use word boundary regex to match whole words only + pattern = r'\b' + re.escape(keyword) + r'\b' + if re.search(pattern, text_to_analyze): + generated_tags.append(tag) + generated_tags_set.add(tag) + break + + # Step 3: Remove existing tags that are also in generated tags (case-insensitive) + generated_tags_lower = {tag.lower() for tag in generated_tags} + filtered_existing_tags = [tag for tag in existing_tags if tag.lower() not in generated_tags_lower] + + # Step 4: Define priority tags + priority_tags_list = [ + 'Profit7', + 'Partner', + 'IntegrationId', + 'Tutorial', + 'GetConnector', + 'UpdateConnector', + 'Setup'] + + # Separate tags into three categories + prioritized_tags = [] + remaining_generated_tags = [] + + for tag in generated_tags: + if tag in priority_tags_list: + prioritized_tags.append(tag) + else: + remaining_generated_tags.append(tag) + + # Sort prioritized tags by their priority order + prioritized_tags.sort(key=lambda x: priority_tags_list.index(x) if x in priority_tags_list else 999) + + # Step 5: Combine in order: priority tags -> existing tags -> remaining generated tags + final_tags = prioritized_tags + filtered_existing_tags + remaining_generated_tags + + # Step 6: Remove any duplicates while preserving order, and capitalize first letter + seen = set() + unique_tags = [] + for tag in final_tags: + tag_lower = tag.lower() + if tag_lower not in seen: + seen.add(tag_lower) + # Capitalize first letter of the tag + capitalized_tag = tag[0].upper() + tag[1:] if len(tag) > 0 else tag + unique_tags.append(capitalized_tag) + + # Step 7: Limit to 6 tags + return unique_tags[:6] + + +def add_frontmatter_to_file(filepath: Path, base_path: Path) -> bool: + """Add or update tags in the frontmatter of a markdown file.""" + try: + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + + # Skip if file is empty or too short + if len(content.strip()) < 10: + print(f"⊘ Skipping (too short): {filepath.name}") + return False + + # Parse the markdown file + post = frontmatter.loads(content) + + # Generate tags + tags = generate_tags(filepath, post.content, post.metadata) + + # Skip if no meaningful tags could be generated + if not tags: + print(f"⊘ Skipping (no tags): {filepath.name}") + return False + + # Update metadata with tags as comma-separated string + post.metadata['tags'] = ', '.join(tags) + + # Convert back to markdown with frontmatter + new_content = frontmatter.dumps(post) + + # Write back to file with UTF-8 encoding + with open(filepath, 'w', encoding='utf-8') as f: + f.write(new_content) + + tags_str = ', '.join(tags) + try: + rel_path = filepath.relative_to(base_path) + except ValueError: + rel_path = filepath.name + print(f"✓ Updated: {rel_path} → [{tags_str}]") + return True + + except Exception as e: + print(f"✗ Error processing {filepath.name}: {e}") + return False + + +def process_directory(base_path: Path): + """Process all markdown files in the /profit directory only.""" + profit_path = base_path / 'profit' + + if not profit_path.exists(): + print(f"Error: Profit directory {profit_path} does not exist!") + return + + markdown_files = list(profit_path.rglob('*.md')) + + # Filter out README files + markdown_files = [ + f for f in markdown_files + if f.name.lower() != 'readme.md' + ] + + print(f"\nFound {len(markdown_files)} markdown files to process in /profit directory\n") + + processed = 0 + skipped = 0 + + for filepath in sorted(markdown_files): + result = add_frontmatter_to_file(filepath, base_path) + if result: + processed += 1 + else: + skipped += 1 + + print(f"\n{'='*60}") + print(f"Summary:") + print(f" ✓ Processed: {processed}") + print(f" ⊘ Skipped: {skipped}") + print(f" (Only /profit directory processed)") + print(f"{'='*60}\n") + + +if __name__ == "__main__": + # Get the script's directory + script_dir = Path(__file__).parent + + # Go up to OASContent and then into markdownpages + base_path = script_dir.parent / 'markdownpages' + + if not base_path.exists(): + print(f"Error: Directory {base_path} does not exist!") + exit(1) + + print(f"Processing markdown files in: {base_path}\n") + process_directory(base_path) diff --git a/scripts/markdown-naming-check.py b/scripts/markdown-naming-check.py index ca7be11..1fb5582 100644 --- a/scripts/markdown-naming-check.py +++ b/scripts/markdown-naming-check.py @@ -2,27 +2,40 @@ """ Markdown File Naming Validator -This script validates that all markdown files in the repository follow kebab-case naming convention, -except for AppConnectorAuditor* files which are allowed to be named differently. -It recursively scans for *.md files and reports any violations. +This script validates that all markdown files in the repository follow kebab-case naming convention. +It can scan all files or only new/modified files in git. +Also validates that the date in frontmatter matches the current date for changed files. Author: GitHub Copilot Date: 2025-07-29 """ -import os import sys import argparse import json +import subprocess from pathlib import Path -from typing import List, Dict, Tuple +from typing import List, Dict, Tuple, Set import re +from datetime import datetime +import frontmatter + +# Set UTF-8 encoding for Windows console to handle emojis +if sys.platform == 'win32': + try: + sys.stdout.reconfigure(encoding='utf-8') + sys.stderr.reconfigure(encoding='utf-8') + except AttributeError: + # Python < 3.7 + import codecs + sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict') + sys.stderr = codecs.getwriter('utf-8')(sys.stderr.buffer, 'strict') class MarkdownNamingValidator: - """Validates markdown file naming conventions.""" + """Validates markdown file naming conventions and date consistency.""" - def __init__(self, root_path: str = ".", exclusions: List[str] = None, json_output: bool = False): + def __init__(self, root_path: str = ".", exclusions: List[str] = None, json_output: bool = False, git_mode: bool = False, fix_dates: bool = False): """ Initialize the validator. @@ -30,13 +43,105 @@ def __init__(self, root_path: str = ".", exclusions: List[str] = None, json_outp root_path: Root directory to start scanning from exclusions: List of patterns to exclude from validation json_output: Whether to output results in JSON format + git_mode: If True, only check new/modified files in git + fix_dates: If True, automatically update dates in frontmatter """ self.root_path = Path(root_path).resolve() self.exclusions = exclusions or [] self.json_output = json_output + self.git_mode = git_mode + self.fix_dates = fix_dates self.violations = [] + self.date_violations = [] + self.date_fixes = [] self.total_files = 0 + self.current_date = datetime.now().strftime('%Y-%m-%d') + + def get_changed_markdown_files(self) -> Set[Path]: + """ + Get list of new or modified markdown files from git. + Returns: + Set of Path objects for changed markdown files + """ + try: + # Get the git root directory + git_root_result = subprocess.run( + ['git', 'rev-parse', '--show-toplevel'], + capture_output=True, + text=True, + cwd=self.root_path + ) + + if git_root_result.returncode != 0: + return set() + + git_root = Path(git_root_result.stdout.strip()) + + # Get staged files (git add) + staged_result = subprocess.run( + ['git', 'diff', '--cached', '--name-only', '--diff-filter=ACMR'], + capture_output=True, + text=True, + cwd=git_root + ) + + # Get unstaged files (modified but not added) + unstaged_result = subprocess.run( + ['git', 'diff', '--name-only', '--diff-filter=ACMR'], + capture_output=True, + text=True, + cwd=git_root + ) + + # Get untracked files + untracked_result = subprocess.run( + ['git', 'ls-files', '--others', '--exclude-standard'], + capture_output=True, + text=True, + cwd=git_root + ) + + # Combine all changed files + all_files = set() + + if staged_result.returncode == 0: + all_files.update(staged_result.stdout.strip().split('\n')) + + if unstaged_result.returncode == 0: + all_files.update(unstaged_result.stdout.strip().split('\n')) + + if untracked_result.returncode == 0: + all_files.update(untracked_result.stdout.strip().split('\n')) + + # Filter for markdown files only and convert to Path objects + # Files must be under self.root_path and be markdown files + markdown_files = set() + for file in all_files: + if file and file.endswith('.md'): + # Construct full path from git root + file_path = git_root / file + # Check if file is under our root_path and exists + if file_path.exists(): + try: + # Check if the file is within our root_path + file_path.relative_to(self.root_path) + markdown_files.add(file_path) + except ValueError: + # File is not under root_path, skip it + pass + + return markdown_files + + except FileNotFoundError: + if not self.json_output: + print("Warning: git not found. Falling back to scanning all files.", file=sys.stderr) + return set() + except Exception as e: + if not self.json_output: + print(f"Warning: Error getting git changes: {e}. Falling back to scanning all files.", file=sys.stderr) + return set() + def is_excluded(self, file_path: Path) -> bool: """ Check if a file should be excluded from validation. @@ -47,7 +152,11 @@ def is_excluded(self, file_path: Path) -> bool: Returns: True if the file should be excluded, False otherwise """ - relative_path = str(file_path.relative_to(self.root_path)).replace('\\', '/') + try: + relative_path = str(file_path.relative_to(self.root_path)).replace('\\', '/') + except ValueError: + relative_path = str(file_path) + filename = file_path.name for pattern in self.exclusions: @@ -93,6 +202,73 @@ def validate_filename(self, file_path: Path) -> Tuple[bool, str]: return False, suggested_filename + def validate_date(self, file_path: Path) -> Tuple[bool, str]: + """ + Validate that the date in frontmatter matches current date for changed files. + Only validates if git_mode is True. + + Args: + file_path: Path to the markdown file + + Returns: + Tuple of (is_valid, current_date_in_file) + """ + # Only validate dates in git mode (for changed files) + if not self.git_mode: + return True, "" + + try: + with open(file_path, 'r', encoding='utf-8') as f: + post = frontmatter.load(f) + + file_date = post.metadata.get('date', '') + + # If no date field exists, it's not valid + if not file_date: + return False, "missing" + + # Convert date to string if it's a datetime object + if isinstance(file_date, datetime): + file_date = file_date.strftime('%Y-%m-%d') + else: + file_date = str(file_date) + + # Check if date matches current date + return file_date == self.current_date, file_date + + except Exception as e: + # If we can't read the file or parse frontmatter, skip validation + return True, "" + + def fix_date(self, file_path: Path) -> bool: + """ + Update the date in frontmatter to current date. + + Args: + file_path: Path to the markdown file + + Returns: + True if date was updated successfully, False otherwise + """ + try: + with open(file_path, 'r', encoding='utf-8') as f: + post = frontmatter.load(f) + + # Update the date as a date object (without time) + current_datetime = datetime.strptime(self.current_date, '%Y-%m-%d') + post.metadata['date'] = current_datetime.date() + + # Write back to file + with open(file_path, 'w', encoding='utf-8') as f: + f.write(frontmatter.dumps(post)) + + return True + + except Exception as e: + if not self.json_output: + print(f"Error updating date in {file_path}: {e}", file=sys.stderr) + return False + def to_kebab_case(self, text: str) -> str: """ Convert text to kebab-case. @@ -123,8 +299,16 @@ def to_kebab_case(self, text: str) -> str: def scan_directory(self) -> None: """Recursively scan directory for markdown files and validate naming.""" - # Find all markdown files recursively - markdown_files = list(self.root_path.rglob("*.md")) + if self.git_mode: + # Only check changed files + markdown_files = list(self.get_changed_markdown_files()) + if not markdown_files: + if not self.json_output: + print("No new or modified markdown files found in git.") + else: + # Find all markdown files recursively + markdown_files = list(self.root_path.rglob("*.md")) + self.total_files = len(markdown_files) for file_path in markdown_files: @@ -137,7 +321,11 @@ def scan_directory(self) -> None: is_valid, suggested_name = self.validate_filename(file_path) if not is_valid: - relative_path = str(file_path.relative_to(self.root_path)) + try: + relative_path = str(file_path.relative_to(self.root_path)) + except ValueError: + relative_path = str(file_path) + violation = { "file_path": relative_path, "current_name": file_path.name, @@ -145,6 +333,55 @@ def scan_directory(self) -> None: "full_path": str(file_path) } self.violations.append(violation) + + # Validate date in frontmatter (only in git mode) + if self.git_mode: + date_valid, file_date = self.validate_date(file_path) + + if not date_valid: + if self.fix_dates: + # Try to fix the date automatically + if self.fix_date(file_path): + try: + relative_path = str(file_path.relative_to(self.root_path)) + except ValueError: + relative_path = str(file_path) + + fix_info = { + "file_path": relative_path, + "old_date": file_date, + "new_date": self.current_date, + "full_path": str(file_path) + } + self.date_fixes.append(fix_info) + else: + # Fix failed, record as violation + try: + relative_path = str(file_path.relative_to(self.root_path)) + except ValueError: + relative_path = str(file_path) + + date_violation = { + "file_path": relative_path, + "current_date": file_date, + "expected_date": self.current_date, + "full_path": str(file_path) + } + self.date_violations.append(date_violation) + else: + # Not fixing, just record violation + try: + relative_path = str(file_path.relative_to(self.root_path)) + except ValueError: + relative_path = str(file_path) + + date_violation = { + "file_path": relative_path, + "current_date": file_date, + "expected_date": self.current_date, + "full_path": str(file_path) + } + self.date_violations.append(date_violation) def generate_report(self) -> Dict: """ @@ -154,10 +391,13 @@ def generate_report(self) -> Dict: Dictionary containing validation results """ return { + "mode": "git" if self.git_mode else "all", "total_files_checked": self.total_files, "violations_found": len(self.violations), + "date_violations_found": len(self.date_violations), "violations": self.violations, - "success": len(self.violations) == 0 + "date_violations": self.date_violations, + "success": len(self.violations) == 0 and len(self.date_violations) == 0 } def print_report(self) -> None: @@ -171,25 +411,57 @@ def print_report(self) -> None: # Human-readable output print("=" * 60) print("Markdown File Naming Validation Report") + if self.git_mode: + print("Mode: Git changes only (new/modified files)") + else: + print("Mode: All files") print("=" * 60) print(f"Total markdown files checked: {self.total_files}") - print(f"Violations found: {len(self.violations)}") + print(f"Naming violations found: {len(self.violations)}") + if self.git_mode: + print(f"Date violations found: {len(self.date_violations)}") + if self.fix_dates: + print(f"Dates automatically fixed: {len(self.date_fixes)}") print() + if self.date_fixes: + print("DATES AUTOMATICALLY FIXED:") + print("-" * 40) + for i, fix in enumerate(self.date_fixes, 1): + print(f"{i}. File: {fix['file_path']}") + print(f" Old date: {fix['old_date']}") + print(f" New date: {fix['new_date']}") + print() + if self.violations: - print("VIOLATIONS DETECTED:") + print("NAMING VIOLATIONS DETECTED:") print("-" * 40) for i, violation in enumerate(self.violations, 1): print(f"{i}. File: {violation['file_path']}") print(f" Current name: {violation['current_name']}") print(f" Suggested name: {violation['suggested_name']}") print() - + + if self.date_violations: + print("DATE VIOLATIONS DETECTED:") + print("-" * 40) + for i, violation in enumerate(self.date_violations, 1): + print(f"{i}. File: {violation['file_path']}") + print(f" Current date: {violation['current_date']}") + print(f" Expected date: {violation['expected_date']}") + print() + + if self.violations or self.date_violations: print("SUMMARY:") - print("❌ Validation FAILED - Please rename the files above to follow kebab-case convention.") + if self.violations: + print("Naming validation FAILED - Please rename the files above to follow kebab-case convention.") + if self.date_violations: + print(f"Date validation FAILED - Please update the date in frontmatter to {self.current_date}.") else: - print("✅ All markdown files follow the kebab-case naming convention!") - print("✅ Validation PASSED") + print("All markdown files follow the kebab-case naming convention!") + if self.git_mode: + print(f"All changed files have correct date ({self.current_date}) in frontmatter!") + print("Validation PASSED") def validate(self) -> bool: """ @@ -201,19 +473,20 @@ def validate(self) -> bool: try: self.scan_directory() self.print_report() - return len(self.violations) == 0 + return len(self.violations) == 0 and len(self.date_violations) == 0 except Exception as e: if self.json_output: error_report = { "error": str(e), "success": False, + "mode": "git" if self.git_mode else "all", "total_files_checked": 0, "violations_found": 0, "violations": [] } print(json.dumps(error_report, indent=2)) else: - print(f"❌ Error during validation: {e}", file=sys.stderr) + print(f"Error during validation: {e}", file=sys.stderr) return False @@ -227,9 +500,22 @@ def main(): This script validates that markdown files follow kebab-case naming convention. Examples: + # Check all files python markdown-naming-check.py + + # Check only new/modified files in git + python markdown-naming-check.py --git + + # Check and automatically fix dates in changed files + python markdown-naming-check.py --git --fix-dates + + # Check specific directory python markdown-naming-check.py --root-path ./docs - python markdown-naming-check.py --json + + # JSON output for CI/CD + python markdown-naming-check.py --git --json + + # Exclude specific patterns python markdown-naming-check.py --exclude "temp/*" "draft_*.md" """ ) @@ -240,6 +526,18 @@ def main(): help="Root directory to start scanning from (default: current directory)" ) + parser.add_argument( + "--git", + action="store_true", + help="Only check new or modified files in git (staged, unstaged, and untracked)" + ) + + parser.add_argument( + "--fix-dates", + action="store_true", + help="Automatically update dates in frontmatter to current date (only with --git)" + ) + parser.add_argument( "--exclude", nargs="*", @@ -265,7 +563,9 @@ def main(): validator = MarkdownNamingValidator( root_path=args.root_path, exclusions=args.exclude, - json_output=args.json + json_output=args.json, + git_mode=args.git, + fix_dates=args.fix_dates ) # Run validation